Matrices

Huge thanks to u/anonymous-desmos and u/VoidBreakX for their contributions.

Please note that this does NOT refer to the Desmos Matrix Calculator. This matrix update allows the creation and manipulation of matrices in the graphing calculator. Here are (most) features of matrices:

Type matrix for a matrix. You can also type a # then two digits for the matrix dimensions. For example #24 creates a 2x4 matrix.

You can multiply and add matrices, raise them to powers (including negative ones), take the transpose with ^T, and use functions like det, rref, and trace.

Take a 2x2 matrix M, and write M(1,2) to transform the point (1,2). You can do the same with a 3x3 matrix and a 3d point.

Putting a matrix inside another matrix will join the matrices together like a block matrix.

Matrix Comprehension

You can also do a matrix comprehension to create a matrix. Use a semicolon to seperate the row variable from the column variable.

However, a matrix with more than 9 rows or columns can't be updated with an action.

Indexing

Index a matrix M with M[2;3] (second row, third column). You can use the indexing notation to take submatrices. For example, to get rows 3,4 and columns 1,2,3 of a matrix M, you can either write M[3,4;1,2,3] or M[[3,4];[1,2,3]]. Leaving one of these elements returns the entire row/column. For example, M[1,2;] gets row 1,2 and keeps all the columns.

Extract entire rows or columns using .rows and .columns.

List of Matrices

Lists of matrices of varying sizes are possible. For example, having a 3x1 matrix and 2x2 matrix in the same list is allowed.

Because of this, you can't take the total or the sum of a list of matrices. You can however write a recursive function to do so, e.g. f(L) = {L.count = 1: L[1], f(L[2...]) + L[1]}.

Lists inside matrices will broadcast. For example, a 1x2 matrix with elements [2,3,4] and 0 will broadcast into 3 matrices: [2 0], [3 0], and [4 0].

Instead of looping a matrix with numbered indices with M.columns.count and M.rows.count, you can instead loop over the columns and rows directly. For example, to calculate the sum of all elements in a matrix, you can write total(v.columns.total for v = M.rows).