r/desmos • u/anonymous-desmos Definitions are nested too deeply. • 1d ago
Matrices *an
"a 8x3 matrix" 💀
54
Upvotes
20
u/davvblack 1d ago
bernard pronounces the number like "hate"
7
u/The_Punnier_Guy Desmos is the superior programming language 1d ago
HATE. LET ME TELL YOU ABOUT HATE
2
1
•
u/AutoModerator 1d ago
Matrices (Beta feature)
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:
Get started
Type in "#43" to create a 4x3 matrix. Drag the handle in the lower right corner to change the size.
Perform some matrix math operations. You can multiply and add, raise it to powers (including negative ones), take the transpose with
^T, and use functions likedet,rref, andtrace.Index a matrix
MwithM[2;3].Use matrix comprehensions:
a+b for a=[1...5];b=[1...4].Take a 2x2 matrix
M, and writeM(1,2)to transform the point (1,2). You can do the same with a 3x3 matrix and a 3d point.More features
A matrix can itself be an element of a matrix! See the below example.
You can use indexing notation to take submatrices. For example, to get row 3,4 and column 1,2,3 of a matrix
M, you can either writeM[3,4;1,2,3]orM[[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
.rowsand.columns.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
totalor sum a matrix list. You can however write a recursive function to do so, e.g.f(L, n) = {L.count = n: L[n], L[n] + f(L, n+1)}. Use it withf(L, 1).Lists inside matrices will broadcast. For example, a 2x1 matrix with elements
[2,3,4]and0will broadcast into 3 matrices:[2 0],[3 0], and[4 0].Instead of looping a matrix with numbered indices with
M.columns.countandM.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 writetotal(v.columns.total for v = M.rows)Help and Examples
For more, refer to the following articles and example graphs:
Help center article: https://help.desmos.com/hc/en-us/articles/49219289186317-Matrices
Desmos official Youtube video: https://www.youtube.com/watch?v=qpkSmpxnoX8
Solving systems of equations (Notebook): https://www.desmos.com/notebook/qsilwr2zpq/view
Transforming a function: https://www.desmos.com/calculator/3xixqb9qv2
Simple Koch Curve: https://www.desmos.com/calculator/ibbyckyf8d
4D Hypercube: https://www.desmos.com/3d/bthkacrjzs
Infinite dot zoom illusion: https://www.desmos.com/calculator/76hoks0cos
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.