matrix( [ ring , rows , columns , ] elements )
The matrix of elements in SageMath. A base ring is inferred if not specified.
The optional integers rows and columns are used when elements are not provided as an array. Specifying rows without columns returns a square matrix.
Matrix indices are zero based in SageMath.
Examples:
Operation category: matrix operations sagemath-docs