next | previous | forward | backward | up | top | index | toc | home

matrix -- make a matrix

Description

The simplest use of this function is to define a matrix by giving a doubly nested list of ring elements. One may also explicitly provide the ring, or give a matrix as a doubly-nested list of matrices.
i1 : matrix{{1,2,3},{4,5,6}}

o1 = | 1 2 3 |
     | 4 5 6 |

              2        3
o1 : Matrix ZZ  <--- ZZ
i2 : R = QQ[x,y,z];
i3 : matrix{{x,0,2},{1,2,y}}

o3 = | x 0 2 |
     | 1 2 y |

             2       3
o3 : Matrix R  <--- R
The map function provides other methods to define a matrix.

Ways to use matrix :