Linear Algebra

Matrix Re-lative

Honest Talk

I will start this section out honestly by telling you this is not easy math, because it is not short math. Linear algebra is exactly what it sounds like, algebra that delineates degrees of freedom, or more simply paths to take. Point blank, they also call this shit matrix math. Why? Because it is often performed in what's known as a hex calculator. Sound crazy? It is. It's like calculus for calculations at the same time. Now how do you do it without a hex calculator and what do they call paths? Paths are known as vectors and they are made of 2 parts, a magnitude and a direction. And to perform without a calculator you have several parts that must be accounted for. Being honest, you don't do this in your every day life but we'll discuss it simply to demystify Einstein… because that's not that hard. If Eigen do this, yougen as well…

What's a Vector?

In the last chapter we talked about probability as paths. In this chapter, the paths get formal names. A vector is a path with two properties: how far it goes (magnitude) and which way it points (direction).

Think of it like driving. "60 miles" is a magnitude. "North" is a direction. "60 miles north" is a vector. It tells you not just how much, but where.

A number by itself—like 5 or -3—is called a scalar. It only has magnitude. A vector has magnitude AND direction. That's the upgrade. Scalars tell you how much. Vectors tell you how much AND where.

We write vectors as lists of numbers. In 2D: [3, 4] means "go 3 in the x-direction and 4 in the y-direction." In 3D: [1, 2, 5] means "go 1 in x, 2 in y, 5 in z." Each number tells you how far to go along one axis—one degree of freedom.

The magnitude of [3, 4] is 5. Why? Pythagorean theorem. The triangle chapter comes back. √(3² + 4²) = √(9 + 16) = √25 = 5. The magnitude is the hypotenuse—the actual distance traveled when you combine both directions.

And here's the thing: vectors don't care where they start. [3, 4] starting from the origin is the same vector as [3, 4] starting from point (10, 20). The vector describes the MOTION, not the position. It's a displacement, a change. Sound familiar? Derivatives were rates of change. Vectors are directions of change. Math keeps building on itself.

Adding Vectors: Combining Motions

Vector addition is simple and beautiful. You just add the corresponding components.

[3, 4] + [1, -2] = [4, 2]

Geometrically, this means: take one path, then take the other path from where you ended up. The result is where you land. It's like walking 3 blocks east and 4 blocks north, then 1 block east and 2 blocks south. You end up 4 blocks east and 2 blocks north.

This is why vectors matter for physics. Forces are vectors. If two forces act on an object, the result is the vector sum. Gravity pulls down [0, -9.8]. You push right [5, 0]. The object experiences [5, -9.8]—it moves right AND falls. Both motions happen simultaneously and the vector addition gives you the combined result.

Matrices: The Machine That Transforms Everything at Once

Okay. Here's where linear algebra earns its reputation.

A matrix is a grid of numbers. 2×2, 3×3, whatever dimensions you need. And what a matrix DOES is transform vectors. You put a vector in, a different vector comes out.

| a b | | x | | ax + by |

| c d | × | y | = | cx + dy |

That's a 2×2 matrix transforming a 2D vector. The matrix takes the input vector [x, y] and produces a new vector [ax + by, cx + dy]. It's a function—but instead of operating on a single number, it operates on an entire vector. An entire path.

What kinds of transformations? Rotation. Scaling. Stretching. Shearing. Reflection. Every linear transformation you can imagine is a matrix. Spin something 45 degrees? There's a matrix for that. Double the size? Matrix. Mirror it across an axis? Matrix. All of them are just grids of numbers that, when multiplied by a vector, produce the transformed version.

This is why it's called "matrix math" and why they use hex calculators and computers. When you have a 3D object with thousands of points, and you want to rotate it, you multiply EVERY point by the same rotation matrix. Thousands of vector transformations, all at once, all using the same grid of numbers. That's computer graphics. That's video games. That's every 3D movie you've ever seen.

Matrix Multiplication: Chaining Transformations

If one matrix rotates and another matrix scales, what happens when you multiply the matrices together? You get a single matrix that rotates AND scales. The product of two transformation matrices is a new matrix that does both transformations in sequence.

This is why matrix multiplication isn't commutative. A × B ≠ B × A. Rotating then scaling gives a different result than scaling then rotating. The order matters because you're chaining paths, and the path you take first changes where the second path starts from. Conditional probability again—where you ARE affects where you can GO.

Matrix multiplication is also why this math is hard. To multiply a 3×3 matrix by another 3×3, you're doing 27 multiplications and 18 additions. For a 4×4 matrix (common in 3D graphics), it's 64 multiplications and 48 additions. For every single operation. That's why we use computers. The concepts aren't hard. The computation is long.

The Determinant: Does This Path Lead Somewhere?

Every square matrix has a number associated with it called the determinant. It tells you one crucial thing: does this transformation squish everything into a lower dimension?

If the determinant is zero, the matrix collapses space. A 2D region gets squished to a line, or a point. Information is lost. You can't reverse the transformation because multiple starting points all end up at the same place. Like taking a 3D sculpture and steamrolling it flat—you can't unflatten it because you don't know what the depth was.

If the determinant is not zero, the transformation is reversible. You can undo it. You can go back. The paths work in both directions.

For a 2×2 matrix [[a, b], [c, d]], the determinant is ad - bc. That's it. Four numbers, two multiplications, one subtraction. And it tells you whether the entire transformation is reversible or not.

The determinant also tells you how much the transformation scales areas. A determinant of 2 means areas double. A determinant of 0.5 means areas halve. A negative determinant means the transformation flips orientation—like looking in a mirror.

Eigenvalues and Eigenvectors: What Doesn't Change

This is the Einstein part. This is the part that sounds scary and is actually the most beautiful idea in all of linear algebra.

Eigen is German for "own" or "self." An eigenvector is a vector that, when transformed by a matrix, doesn't change direction. It might get longer or shorter, but it keeps pointing the same way. The eigenvalue is the factor by which it scales.

Picture a transformation that stretches space horizontally. Most vectors change direction—they get pulled sideways. But a vector pointing purely horizontal? It just gets longer. It doesn't rotate. That vector is an eigenvector of the stretching transformation. The amount it gets stretched is the eigenvalue.

Why does this matter? Because eigenvalues tell you what's FUNDAMENTAL about a transformation. Strip away all the complexity—the rotations, the shearing, the mixing of dimensions—and the eigenvalues tell you the essential behavior. They're the DNA of the matrix.

In physics, eigenvalues are everywhere. The energy levels of an atom? Eigenvalues. The fundamental frequencies a bridge vibrates at? Eigenvalues. The modes of a quantum system? Eigenvalues. When physicists say they're "solving" a system, they often mean finding the eigenvalues.

Einstein's general relativity uses matrices (technically tensors, which are matrices on steroids) to describe how space-time curves around mass. The eigenvalues of these tensors tell you the principal directions of curvature—how space is warped in the most fundamental way. That's what E = mc² comes from. Energy, mass, and the speed of light are related through the eigenvalues of space-time's curvature.

Not that hard, right? An eigenvalue is just the answer to the question: what doesn't change when everything else does? That's a question a kid can understand. The math to compute it is long—but the concept is simple.

Systems of Equations: Many Questions, One Answer

Here's where linear algebra connects to every other math you've learned.

In algebra, you solved equations like 3x + 2 = 8. One equation, one unknown. Linear algebra handles systems—multiple equations, multiple unknowns, all at once.

2x + 3y = 7

4x - y = 1

Two equations, two unknowns. This is the same as the matrix equation:

| 2 3 | | x | | 7 |

| 4 -1 | × | y | = | 1 |

The matrix encodes the structure of the system. The vector on the right is what you're trying to reach. Solving means finding the input vector [x, y] that the matrix transforms into [7, 1].

If the determinant isn't zero, there's exactly one solution—one path from input to output. If the determinant IS zero, either there's no solution (the paths don't reach there) or infinite solutions (many paths converge). The determinant tells you the structure of the answer before you compute it.

The Relativity of It All

Here's why this chapter is called Matrix Re-lative. Everything in linear algebra is about relationships.

Vectors describe relationships between points. Matrices describe relationships between spaces. Eigenvalues describe the relationship between a transformation and its essential behavior. Determinants describe the relationship between a transformation and reversibility.

And the big one: linear algebra is the math of multiple things happening at once. Calculus handles one variable changing. Linear algebra handles all of them changing together. That's why it's the language of physics, computer graphics, machine learning, economics, engineering—anything where the answer isn't a single number but a whole configuration of numbers that all depend on each other.

Not easy math. Not short math. But honest math. It tells you how things relate, how they transform, and what survives when everything changes. If Eigen do this, yougen as well.