Matrices, vectors and points
Writing a matrix
Create a matrix by typing mat. Insert columns by pressing , and rows by pressing enter. You can navigate between cells using your arrow keys.

Vectors and points
Vectors and points are just special cases of matrices. A vector is just a matrix with only one row or column. That means a vector with 3 components could be written in either of these ways:
Note that even though these are both considered 3-vectors, you cannot add them together since they have a different shape. They will also behave differently with matrix multiplication.
A point is just a vector with two components. Points are special because they are drawn in the graph. You can adjust the size and color of a point in the same way as a normal graph: right click or long left click the color swatch next to the point, and then adjust the options in the menu. You can also click this color swatch to toggle the point on and off in the graph.

You can also make a point draggable by checking the draggable box in the menu as long as the point is not dependent on any other variables, and does not include math expresions.
Accessing elements of a vector
You can pull a single component out of a vector by writing v[n], where n is the position of the component you want. Positions are counted from zero, so v[0] is the first component, v[1] is the second, and so on.
The first four components also have names. You can write v.x, v.y, v.z and v.w to access components 0 through 3. For points and small vectors this usually reads more naturally than a numbered index.
Both forms work the same way on row vectors and column vectors, and the result is an ordinary value that you can use anywhere else in your math:
The index has to be a number written directly into the expression. Indexing with a variable (for example v[k]) is not currently supported. Out-of-range indices show an error immediately: asking for v[3] on a 3-component vector is caught right away.
Single-index access works on vectors with up to 4 components. For a longer vector, use the slice form from the next section instead: on a column vector, v[:, n] reads component n.
Accessing elements of a matrix
The easiest way to think about indexing a matrix is to think of the matrix as a row of column vectors standing side by side. Writing M[i] picks out the ith column, counted from zero:
Since M[i] is a vector, you can index it again to get a single element. M[i][j] picks column i and then reads component j from it, exactly like indexing a vector. The two-index form M[i, j] is a shorthand for the same thing. In other words, the first index says how far across to go and the second says how far down, the same order as ( "x" , "y" ) coordinates on the graph.
Heads up if you're coming from textbooks or other tools: the written convention "A" Subscript, "j" "k" , Baseline and most programming languages put the row index first. Eigenslate puts the column first, so M[i, j] is column i, row j. If a lookup ever surprises you, remember: across, then down.
Extracting rows and columns
You can use : in place of an index to mean "all of them". M[:, j] keeps every column and fixes the row, giving you row j as a row vector. M[i, :] fixes the column and keeps every row, which is just a longer way of writing M[i].
A row or column extracted this way is a real vector, so everything from the previous section applies to it. For example M[1, :].x reads the top entry of column 1.
Quick reference
| You write | You get |
|---|---|
v[n] | component n of a vector (up to 4 components) |
v.x v.y v.z v.w | components 0, 1, 2, 3 |
M[i] | column i |
M[i, j] or M[i][j] | the element in column i, row j |
M[:, j] | row j |
M[i, :] | column i (same as M[i]) |
Matrix operations
Matrix multiplication and addition
You can add and multiply matricies using standard rules of matrix multiplication.
Transpose
The transpose of a matrix can be written as M^H or matrix^\top followed by a space to complete the \top. Note that this is the hermitian transpose meaning the complex conjugate is applied to all entries. You can ignore this if you aren't working with complex matricies.

Determinant
The determinant of a matrix is written det(M).
Inverse
The inverse of a matrix is written matrix^(-1).
You can divide by a matrix and it is the same as multiplying by the inverse of that matrix on the left.
Matrix exponential
The matrix exponential is computed by raising e to the power of a square matrix.
Note that this is not the same as raising e to each entry of the matrix (that would have turned the zeros into ones). The matrix exponential is the matrix version of the exponential function: the derivative of "e" Superscript, "A" "t" , Baseline with respect to "t" is "A" "e" Superscript, "A" "t" , Baseline, just like the ordinary exponential. That property makes it the natural way to write solutions of linear differential equations: if StartFraction, "d" "x" Over "d" "t" , EndFraction equals "A" "x", then "x" ( "t" ) equals "e" Superscript, "A" "t" , Baseline "x" ( 0 ).
One consequence you can check directly: rotations are matrix exponentials. Raising e to Start 2 by 2 matrix, Row 1: 0, negative theta ; Row 2: theta , 0, End matrix rotates by the angle theta, and with theta equals StartFraction, pi Over 2 , EndFraction the result is exactly the rotation matrix from the multiplication example above.