# matrix(MutableMatrix) -- make a matrix from a mutable one

## Synopsis

• Function: matrix
• Usage:
matrix m
• Inputs:
• m,
• Optional inputs:
• Degree => ..., default value null, create a matrix from a doubly-nested list of ring elements or matrices
• Outputs:
• , the same matrix as m, but not mutable.

## Description

There are many more operations available for matrices than for immutable matrices, but mutable matrices are sometimes easier to construct.
 i1 : m = mutableMatrix(ZZ,3,5) o1 = 0 o1 : MutableMatrix i2 : m_(1,2) = 3 o2 = 3 i3 : m_(2,4) = 54 o3 = 54 i4 : m_(0,0) = -12 o4 = -12 i5 : m o5 = | -12 0 0 0 0 | | 0 0 3 0 0 | | 0 0 0 0 54 | o5 : MutableMatrix i6 : matrix m o6 = | -12 0 0 0 0 | | 0 0 3 0 0 | | 0 0 0 0 54 | 3 5 o6 : Matrix ZZ <--- ZZ