සංගතිකSangathika

SAM · The machine · leaf

Linear Algebra

A matrix is a machine that moves vectors. Linear algebra is learning to read that machine: first by what it does to the grid, then by what it reaches and what it crushes, then by the directions it leaves alone.

Before this leaf: grid coordinates, arithmetic and Pythagoras.
This leaf feeds: Statistics and data, Differentiation.
Objects you will meet again: the 3-4-5 triangle, the two towns, the dial, the fifteen.

building 2 of 20 lessons built

The Linear algebra leaf, with the cast objects it uses drawn on its veins සංගතික · Sangathika · SAM. © 2026 Niranga Dharmaratna. CC BY-SA 4.0.
  1. 01
  2. 02
  3. 03
  4. 04
  5. 05
  6. 06
  7. 07
  8. 08
  9. 09
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20

Lessons, notes and demos

One row per lesson, in the order the leaf builds up. Each lesson holds its notes, its demos and its challenges on one page. A demo link opens the lesson at that demo.

PageTitleBriefLessonDemosChallengesHands forward
01VectorsA vector is a size and a direction given together.VectorsWalk 5 kmScalar or vector?Same move, anywhereOne arrow, both descriptions3 + 4 is not always 7The scaling sliderReach the ringSeed Branchv = (3, 4) and the 3-4-5 triangle
02SpanThe span is every point you can reach by adding and scaling some arrows.comingPaint the spanReach (−2, 5)?Parallel partnerSeed Brancha second arrow w, and a trail that refused to leave the line
03Linear independenceAn arrow is independent when the others cannot reach it.comingDrop one arrowSeed Brancha test for redundancy without the word parallel
04Basis and coordinatesA basis is the smallest set of arrows that reaches everything.comingSame arrow, two gridsTwo arrows in 3DSeed Branchsame object, different numbers
05Dot productThe dot product is one number that says how much two arrows agree.comingShadow on vPush the carSeed Branch Canopyperpendicular means dot product zero
06Matrices as machinesA matrix is a machine that moves every arrow and keeps the grid straight.comingThe blendWhere does (3, 4) land?Seed Branch Canopythe house matrices S and H
07Matrix times vectorAx can be read as a recipe of columns or as dot products with rows.comingTwo readings of SvSeed Branchthe transpose, lightly, with a promise
08CompositionTwo machines one after another make one machine, and the order matters.comingRotate then shearShear then rotateSeed Branch Canopymatrix multiplication, derived not memorised
09DeterminantThe determinant is how much the machine stretches area.comingSquare to parallelogramSeed Branch Canopydet = 0 collapses the plane
10Systems Ax = bA system asks which input the machine sends to b.comingDrag b, column pictureDrag b, row pictureSeed Branchone, none or infinitely many, and why
11InverseThe inverse is the machine that undoes A, when undoing is possible.comingRun A then A⁻¹Try to undo PSeed Branch Canopya crushed plane cannot be uncrushed
12EliminationElimination changes the equations without changing the answer.comingStep the rowsSeed Branchpivots count what survives
13Column space, null space, rankRank counts what the machine reaches; the rest it crushes to zero.comingSquash space onto a planeSeed Branch Canopyeigenvectors live in a null space
14Projection onto a subspaceA projection is the closest point, and its error is perpendicular.comingDrop b onto a planeSeed Branchthe transpose earns its meaning
15Least squaresWhen no exact answer exists, least squares finds the nearest one.comingFit the lineSeed Branch Canopyregression, for the Statistics leaf
16Orthonormal bases and Gram–SchmidtOrthonormal arrows are perpendicular and of length 1, so coordinates become dot products.comingStraighten a basisSeed Branchthe inverse of a rotation is its transpose
17EigenvectorsAn eigenvector keeps its direction when the machine moves it.EigenvectorsThe blendHunt the directionsRun the yearsMatrix labSeed Branch Canopythe two towns and their 0.700
18Change of basis and diagonalisationRead the machine in its eigen-basis and it only stretches.comingSwitch to the eigen-gridSeed Branch Canopypowers of A become easy
19Symmetric matricesA symmetric machine stretches along perpendicular axes.comingDial to ellipseSeed Branch Canopyperpendicular eigenvectors
20SVDEvery machine is a rotation, a stretch and a rotation.comingThe shear gives inCompress an imageSeed Branch Canopythe capstone

Applications that hang from this leaf

Each application hangs from the lessons it needs. It is built once those lessons exist.

BranchBriefNeedsLesson
Homogeneous coordinatesTranslation is not a linear machine, so graphics adds one coordinate to make it one.page 8coming
Hill cipherA cipher is a matrix that can be undone mod 26.page 11; Modular arithmetic leafcoming
RegressionLeast squares on the fifteen is a regression line.page 15; Statistics leafcoming
PageRankA search ranking is the eigenvector of a web graph.page 18; Graphs and Probability leavescoming
PCAThe covariance matrix of the fifteen is symmetric, and its eigenvectors point along the data.pages 19 and 20; Statistics leafcoming

Use this in your course

Link to any lesson, or to one demo on it: every demo has its own link, shown in the Demos column. You may also copy and adapt these lessons under the CC BY-SA 4.0 licence. Please credit them like this:

සංගතික · Sangathika by Niranga Dharmaratna, CC BY-SA 4.0, https://www.sangathika.com/

More about reuse on the about page.

Glossary

vector page 01
A size and a direction given together; drawn as an arrow, written as a list of components.
span page 02
Every point you can reach by adding and scaling some arrows.
independent page 03
An arrow the others cannot reach; only the zero recipe makes zero.
basis page 04
The smallest set of arrows that reaches everything.
dot product page 05
One number that says how much two arrows agree; zero when they are perpendicular.
matrix page 06
A machine that moves every arrow and keeps the grid straight; its columns say where the basis arrows land.
determinant page 09
How much the machine stretches area; negative means a flip, zero means the plane collapses.
system page 10
The question: which input does the machine send to b?
inverse page 11
The machine that undoes A; it exists only when the determinant is not zero.
elimination page 12
Row moves that change the equations without changing the answer.
rank page 13
The dimension of what the machine reaches.
projection page 14
The closest point in a subspace; its error is perpendicular.
least squares page 15
The nearest reachable answer when no exact one exists.
orthonormal page 16
Perpendicular arrows of length 1.
eigenvector page 17
An arrow that keeps its direction when the machine moves it.
eigenvalue page 17
The number λ that says how much a matrix stretches its eigenvector: Av = λv.
symmetric page 19
A matrix equal to its transpose; it stretches along perpendicular axes.

For the teacher

Sequencing and rationale

Four parts. Part I builds with vectors (span, independence, basis, dot product) so that Part II can read a matrix as a machine described by its columns. Part II runs machine, product, composition, determinant, systems, inverse, elimination, and the four subspaces, in the order need before tool: systems are asked before the inverse answers them. Part III brings length and angle back for projection, least squares and orthonormal bases. Part IV reads the machine on its own axes and ends with SVD, where the shear that defeated eigenvectors gives in. Two house matrices, S and the shear H, recur from page 6 to page 20.