Create Matrices

Matrices are created by defining hierarchical lists which are simply lists containing other lists as elements.

The following list:

A:=[[1,2,3],[4,5,6],[7,8,9]]

is equivalent to the following matrix:

    1  4  7
A = 2  5  8
    3  6  9

The following list:

B:=[1,2,3]

is equivalent to the following column vector:

1
2
3

The following list:

C:=[[1],[2],[3]]

is equivalent to the following row vector:

C = 1  2  3

You can add, subtract, multiply, raise to a power, and invert matrices using the standard arithmetic operators applied to single values (A+B, A-B, A*B, A^n, A^-1). Furthermore, you can calculate the determinant of a matrix using the expression determinant(A) and you can transpose the rows and columns in a matrix using the expression trans(A).

Matrices in arithmetic calculations can contain any complex numbers and units of measure as needed.