3.7.1 Constructing Matrices
Functions for constructing matrices.
This generates a matrix whose entry is a[i, j].
Here is another way to produce the same matrix.
DiagonalMatrix makes a matrix with zeros everywhere except on the leading diagonal.
IdentityMatrix[n] produces an identity matrix.
Of the functions for constructing matrices mentioned above, Table is the most general. You can use Table to produce many kinds of matrices.
Some special types of matrices.
Table evaluates Random[ ] separately for each element, to give a different pseudorandom number in each case.
This gives a tridiagonal matrix.
MatrixForm prints the matrix in a two-dimensional array, and makes the structure in this case clearer.