Matrixes
What revisiting matrices as an adult teaches you about algorithms, data structures, and problem compression.
High school math is compliance theater.
At sixteen, you are handed a rectangular grid of numbers called a matrix. You are drilled on a strange, two-handed finger-tracing dance where your left index finger slides across a row while your right index finger drops down a column.
You are told to cross-multiply two diagonals to find a single number called a determinant, flip a fraction, swap two corners, negate the other two, and plug the result into a worksheet:
You follow the steps. You pass the exam. You collect the grade. And you walk out of the classroom with zero understanding of what a matrix actually is, why anyone invented it, or why multiplying two grids of numbers refuses to work like ordinary arithmetic.
Knowing how to use a procedure is not understanding. Not symbol shuffling, not memorizing a formula for a Friday quiz, and not surviving a standardized test. Understanding means seeing the underlying machine.
When you revisit high school linear algebra as an adult practitioner, especially after years of building software and debugging state machines, the fog clears. You stop looking at arbitrary classroom rules and start seeing how these tools actually function. Matrices are a problem-compression algorithm. They provide a way to take a tangled, multi-variable mess, strip away the visual noise, and restate a hard problem into a deterministic sequence of simple operations.
Arbitrary Rules Hijack the Nervous System
Consider why most intelligent students quietly despise linear algebra the first time they encounter it.
When you are given a rule without the constraint that forced its invention, your brain treats the rule as arbitrary trivia. In high school, nobody explains why matrix multiplication pairs rows with columns instead of multiplying top-left by top-left. Nobody explains why reversing the order of multiplication changes the answer:
Nobody explains what a determinant is actually measuring before forcing you to expand a 3x3 grid by hand.
Ambiguity spikes cognitive load. When you execute a ten-step arithmetic drill without a mental model of the territory, you have no way to sanity-check your intermediate state. One dropped negative sign on step three silently corrupts the entire page. Your threat baseline rises. Adrenaline gets loud, working memory narrows, and you retreat into rote mechanical compliance just to get through the homework.
Passing a class under those conditions builds a fragile illusion of competence. Real mathematical capability moves through three distinct depths:
-
Mechanical compliance: You can execute the row-by-column multiplication drill or plug numbers into a formula as long as the problem looks identical to the textbook example.
-
Conceptual knowledge: You can explain that a matrix encodes a linear transformation, that matrix multiplication composes two transformations into one, and that a determinant measures how space scales or collapses.
-
Operational and embodied skill: When you hit a coupled multi-variable bottleneck in code, 3D graphics, signal processing, or system architecture, you instinctively separate the state vector from the transformation rules and let a clean data representation do the heavy lifting.
Revisiting foundational math as an adult works because you no longer care about grades. You care about leverage. You already know what an array, a function pipeline, and a state transition look like in production, so you finally have the engineering primitives required to decode the architecture.
The Algorithm Dictates the Data Structure
Standard textbooks usually introduce linear algebra as a neat, sterile hierarchy. They define the matrix, define the arithmetic, define the determinant, and finally use it all to solve an equation.
This sequence obscures the actual logic of why these tools exist. The core concepts of linear algebra are best understood not as definitions, but as computational solutions to logistical bottlenecks:
-
Row Reduction (Gaussian Elimination): This is the ultimate algorithmic primitive. It is an in-place state reduction. It eliminates coupled variables by systematically zeroing out a grid, column by column, in cubic time.
-
Determinants: This is a lossiness and invertibility check. It yields a single scalar that measures volume scaling and warns you when a system collapses space.
-
Matrix Multiplication: This is function composition. It pre-computes a combined pipeline of operations into a single operator.
-
The Matrix Itself: This is simply a data structure and interface contract. It decouples the invariant rules of a system from its changing inputs and outputs.
If you try to solve a multi-variable word problem by writing it out in prose or symbolic algebra, you spend half your mental bandwidth copying variable names across lines of text. Stripping away the labels and placing the coefficients in a pure grid turns messy algebra into a physical algorithm. By systematically multiplying and subtracting columns, you can zero out entries until the grid forms a clean triangle and the final unknown stands alone.
You do not start with abstract theory. You start with a logistical bottleneck, design a spatial data structure, and use an algorithm to resolve it.
Separation of Concerns: Restating the Problem
The deepest lesson of linear algebra is not about numbers. It is about how you restate a problem.
Suppose you are handed a system of three coupled linear equations:
When you try to solve this the middle-school way (isolating the first variable, substituting it into the second equation, and so on), you are treating the problem as a bespoke writing exercise. With three variables, substitution is annoying. With ten thousand variables in a physics engine, ad-hoc substitution is impossible.
Restating the system as a matrix equation performs an architectural refactor that every software engineer should recognize immediately. It separates the system’s logic from its state.
Look at what happens when you pull the components apart:
-
The coefficient matrix isolates the coupling structure. It holds the fixed rules of how the system interacts, completely independent of what values pass through it.
-
The variable vector isolates the unknown state. All the variables are packed into a single column.
-
The constant vector isolates the target output. The right-hand constraints sit in their own array.
Once packed into an augmented grid, you stop doing creative algebra. You run a deterministic loop using only a few legal moves like swapping rows, scaling rows, or adding rows together.
By the time the loop finishes, your tangled system where every variable depended on every other variable has been restated into an upper-triangular staircase:
At the bottom row, there is no coupling left. You solve for the bottom variable in one division, plug it into the row above, and cascade up. This is the blueprint for great computer science. Do not solve a complex problem in its raw, coupled representation. Transform the representation step by step until the problem becomes trivial to read off at the end.
Decoding the Strangeness: Multiplication and Determinants
When viewed mechanically, the two things that felt most artificial in high school suddenly make total sense.
1. Matrix Multiplication Is Function Composition
Students often ask why we do not just multiply matching slots in two matrices. The answer is that a matrix is not a passive spreadsheet. It is a function, specifically a linear operator that rotates, scales, or shears space.
Matrix multiplication answers the question: What happens when you feed a vector into one transformation, and feed that output directly into a second transformation?.
The messy row-by-column arithmetic is the exact wiring required to chain two functions so they can be pre-compiled into a single matrix.
Once you view this as function composition, the rules become obvious physical truths:
-
Non-commutativity: Order matters. In a 3D game engine, if you rotate a character 90 degrees then translate them forward, they end up in a completely different spot than if you translate first and rotate second. $AB \neq BA$
-
Associativity: This provides algorithmic leverage. If you need to apply three transformations to a 3D mesh with 100,000 vertices, you do not apply them one by one. You multiply the three matrices together once on the CPU, and apply that single combined matrix to all 100,000 vertices, replacing 300,000 operations with 100,000.
$A(BC) = (AB)C$
2. The Determinant Is a Lossiness Detector
High school turns the determinant into an endurance test of arithmetic. However, computationally, the determinant answers one foundational engineering question. Is this transformation lossless, or does it destroy a dimension?
Geometrically, the determinant is the scaling factor of area or volume when the matrix transforms space:
-
Volume preservation: The transformation preserves scale (for example, a pure rotation): $\det(A) = 1$
-
Orientation flip: The transformation flips space into a mirror:
$det(A) < 0$ -
Dimension collapse: The transformation is lossy:
$det(A) = 0$
If a function crushes a 3D room flat onto a 2D floor, thousands of distinct 3D points land on the exact same floor tile. You cannot write an inverse function to “un-crush” the room because the height information was destroyed. A determinant of zero means dimension collapse, which is the linear algebra equivalent of dividing by zero.
The Adult Practitioner’s Stack
When you strip away the classroom trauma, linear algebra organizes into four operational layers:
-
Foundations (Data Representation): A matrix separates rules from state. Pack coefficients into a grid and let spatial indexing carry the meaning.
-
Leverage (Compositional Pipelines): Matrix multiplication collapses multi-step pipelines into a single pass.
-
Stability (Invertibility): Determinants tell you if your system is stable or lossy before it blows up at runtime.
-
Decorations (Hand-Calculated Drills): Memorizing alternating plus-and-minus signs for manual computation. Understand the mechanism once, then hand the arithmetic to a deterministic solver.
If you have not touched matrices since you were seventeen, you do not know how they actually work yet. You only know how they were graded.
Whenever an engineering problem feels impossibly tangled, ask the matrix question.
Am I fighting this problem because it is genuinely hard, or because I haven’t separated the rules from the state and restated it into a triangular form yet?
High school taught you how to follow the recipe. Revisiting the math as a builder teaches you how to design the kitchen.