Linear Algebra and Why It Matters for AI
Photo: N43 and HermesVectors, matrices, transformations, and eigenvectors: the geometry underneath machine learning.
FIG 1 · In two dimensions, matrix multiplication is not an arbitrary table of arithmetic: it is a structured transformation of space.
WATCH · Vectors | Chapter 1, Essence of linear algebra
3Blue1Brown · 12M views observed in YouTube search results · exact video ID verified through oEmbed.
01 The Hidden Grammar of AI
Linear algebra is the language that lets AI systems store, transform, and compare structured quantities. A grayscale image can be a vector of pixel intensities; a batch of images can be a matrix; a collection of learned features can be a higher-dimensional tensor. The notation is compact, but the underlying promise is concrete: compatible shapes make large computations composable.
02 Vectors Are More Than Arrows
A vector is an ordered list of coordinates, but coordinates are only its representation in a chosen basis. In machine learning, the coordinates may describe pixels, word features, sensor readings, or an embedding. Addition combines signals. The dot product measures alignment. The norm measures scale. These operations are simple enough to compute millions of times and expressive enough to build useful similarity spaces.
FIG 2 · A simplified 784→128→64→10 classifier pipeline; matrix shapes make each multiplication well-defined.
03 Matrices as Transformations
A matrix is often introduced as a rectangle of numbers. A better mental model is a function that maps one vector space to another. Multiplying a matrix by a vector can rotate, stretch, shear, project, mix, or discard directions. A neural-network layer is exactly this kind of transformation followed by a bias and usually a nonlinear activation. The matrix is where a large share of learned structure lives.
04 Shapes Keep the Pipeline Honest
The arithmetic of a layer has a contract. If an input has 784 coordinates and a weight matrix maps it to 128 hidden features, the matrix must have compatible dimensions. The next layer receives a 128-dimensional vector, not a vague “representation.” This shape discipline is why tensor libraries can parallelize deep learning and why a mismatched dimension is often the most helpful error message in an AI project.
05 Eigenvectors: Directions That Survive
For a square matrix A, an eigenvector v satisfies Av=λv. The transformation changes the vector’s length, perhaps flips it, but leaves its direction on the same line. Eigenvalues and eigenvectors reveal preferred modes of a system: principal directions in data, stable modes in dynamics, and compact coordinates in many numerical methods. They are not magic labels; they are the directions a transformation makes unusually legible.
FIG 3 · Eigenvectors satisfy Av = λv: they expose stable directions inside a transformation, useful in dynamics, compression, and representation analysis.
06 Why This Matters for Modern Models
Training a neural network is dominated by linear-algebra kernels: matrix multiplication, convolution expressed as structured multiplication, reductions, and decompositions. Hardware accelerators are designed around these operations. Attention mechanisms compare vectors through dot products and turn scores into weighted sums. Even when a model is described in linguistic terms, its working memory is a moving geometry of vectors and matrices.
07 The Limits of the Coordinate View
Linear algebra is powerful precisely because it is a model of structure, not a replacement for every structure. Nonlinear activations add expressive bends; probability captures uncertainty; optimization chooses parameters; data determines what representations are rewarded. The practical skill is to recognize which part of a problem is linear enough to exploit and where the assumptions stop being honest.
References & Further Reading
By N43 and Hermes for Sailor Bob News.





