Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Matrices with personalities
Some matrices are special, and their shape tells you what they do:
- A diagonal matrix stretches each direction on its own: “make it 2× wider and 3× taller”.
- A symmetric matrix looks the same in a mirror along its diagonal, like a distance table between cities (Delhi→Mumbai = Mumbai→Delhi).
- An orthogonal matrix only turns or flips things, so it never stretches or squashes. Turning a photo is one.
- A permutation matrix just reorders, like shuffling a deck of cards.
- A sparse matrix is almost all zeros, like a friendship table where each person knows only a few others.
Try the “Rotate” and “Reflect” presets: the square never changes size. Then try “Stretch x”: only one direction changes.
det A = 1.00 (area scale) · rank = 2
- 1. A distance table between cities is…
- 2. Which kind of matrix never changes lengths?
- 3. In how many orders can you arrange 3 cards?
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.Diagonal
Multiplying diagonals multiplies their entries, and , as long as no .
Triangular
Upper triangular means all zeros below the diagonal, and lower triangular means all zeros above it. The determinant is the product of the diagonal: . Triangular systems are easy to solve from one end (back-substitution).
Symmetric
, so . For example . Covariance matrices, distance matrices, graph Laplacians and Hessians are all symmetric.
Orthogonal
, so . The columns are unit vectors that are perpendicular to each other. Rotations and reflections are orthogonal. They keep lengths and angles: .
Permutation
An identity matrix with its rows reordered. Multiplying by it reorders the entries of a vector: .
- 1. diag(2, 3) · diag(4, 5) = ?
- 2. det of a triangular matrix with diagonal 1, 5, 2?
- 3. For orthogonal Q, Q⁻¹ = ?
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.Why structure matters: cost
| Structure | Storage | Solve | Notes |
|---|---|---|---|
| General dense | Gaussian elimination | ||
| Diagonal | divide entrywise | ||
| Triangular | back-substitution | ||
| Orthogonal | , perfectly conditioned | ||
| Banded / tridiagonal | splines, 1-D physics, time series | ||
| Sparse ( nonzeros) | depends | graphs, meshes, SLAM, recommender data |
Symmetric and skew-symmetric parts
Every square matrix splits uniquely as , with symmetric and skew-symmetric (). Quadratic forms only see the symmetric part: . That’s why we always assume Hessians and covariances are symmetric. In robotics, skew-symmetric matrices represent cross products and angular velocity: (R2).
Sparse matrices
When most entries are zero, store only the non-zeros. The CSR (compressed sparse row) format keeps three arrays: the values, their column indices, and where each row starts. Graph adjacency matrices and Laplacians, finite-element stiffness matrices, the information matrices of SLAM, and user–item ratings in recommender systems are all sparse. They often have millions of rows and only a handful of non-zeros per row.
Block matrices
Many systems have natural blocks:
for example, the position and velocity parts of a robot state, or the observed and hidden parts of a Gaussian. Block-diagonal matrices act independently on each block, so their determinant and inverse work block by block.
- 1. Cost of solving a triangular n × n system?
- 2. x⊤Ax depends on…
- 3. Nonzeros in a 100 × 100 tridiagonal matrix?
Level 3: Advanced
★★★★☆ Advanced⏱ 45 minGraduate level, with full derivations and proofs.Triangular matrices form a closed world
Products of upper-triangular matrices are upper triangular. If invertible, their inverses are upper triangular too, and .
Proof sketch. . For , every term has (so ) or (so ). For the determinant, expand along the first column repeatedly: only the diagonal survives. The inverse follows from back-substitution applied to each column of . ∎ This closure is why the LU factorization (A2.3) works.
Orthogonal matrices form a group
If are orthogonal, so are and . Every orthogonal has and preserves dot products.
Proof. . Next, . Finally, . ∎
The orthogonal matrices with are the rotations, the group . In 3D, every robot orientation is an element of , with 3 degrees of freedom (R2).
Permutations
There are permutation matrices of size . Each is orthogonal with determinant , the sign of the permutation. A swap of two rows has sign .
Block determinants and the Schur complement
If is invertible, .
The matrix is the Schur complement. It appears when you condition a Gaussian on observed variables (A4.2), in the Kalman filter update (T1), and when eliminating landmarks in SLAM to get a smaller “reduced camera system” (T3).
Exercise 3.1: Check the Schur formula with 1×1 blocks A = 2, B = 1, C = 1, D = 3
, and . ✅
- 1. det Q₁ = 1 and det Q₂ = −1 (both orthogonal). det(Q₁Q₂) = ?
- 2. Block-diagonal matrix with blocks of determinant 2 and 3. Its determinant?
- 3. How many degrees of freedom does SO(3) have?
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.Sparsity is what makes large problems solvable
A dense matrix with a million rows needs entries, about 8 TB in float64. Real problems are almost always sparse:
- SLAM and bundle adjustment. Each measurement links only a few poses or landmarks, so the information matrix is sparse. Factor-graph solvers such as iSAM2 (Kaess et al., 2012) and GTSAM exploit this to map large environments in real time (T3).
- Finite elements and physics simulation. Each mesh node interacts only with its neighbours (A8, J).
- Graph neural networks. Message passing is a sparse matrix product with the adjacency matrix (E14).
- Recommender systems. User–item matrices have far less than 1% of their entries observed (D13).
The order in which a sparse system is factored determines how many new non-zeros (“fill-in”) appear. Finding good orderings, such as COLAMD and nested dissection, is a classic research topic and directly controls SLAM speed.
Structure in modern ML
- Orthogonal weights. Orthogonal initialization (Saxe et al., 2014) and orthogonality constraints keep signal norms stable through deep and recurrent networks (E0).
- Structured matrices for efficiency. Low-rank (LoRA), block-diagonal (grouped convolutions and multi-head attention), Toeplitz (convolutions), and butterfly and Monarch matrices (Dao et al., 2022) cut parameters and FLOPs while keeping expressiveness.
- Permutation symmetry. Hidden units in a layer can be permuted without changing the function. This affects model merging and the geometry of loss landscapes (B4).
References
- H. Markowitz (1957). “The elimination form of the inverse and its application to linear programming.” Management Science, 3(3). (Sparse ordering.)
- I. Schur (1917). “Über Potenzreihen, die im Innern des Einheitskreises beschränkt sind.” Journal für die reine und angewandte Mathematik, 147. (Schur complement.)
- T. Davis (2006). Direct Methods for Sparse Linear Systems. SIAM.
- M. Kaess, H. Johannsson, R. Roberts, V. Ila, J. Leonard, F. Dellaert (2012). “iSAM2: Incremental smoothing and mapping using the Bayes tree.” International Journal of Robotics Research, 31(2).
- A. Saxe, J. McClelland, S. Ganguli (2014). “Exact solutions to the nonlinear dynamics of learning in deep linear neural networks.” ICLR.
- T. Dao et al. (2022). “Monarch: Expressive structured matrices for efficient and accurate training.” ICML.