A matrix is a grid of numbers. But more importantly, a matrix is a transformation — a recipe for reshaping space. When you multiply a matrix by a vector, you move that vector to a new position. That's the core of how neural networks process data.
What transformations can a matrix do?
A 2D matrix can rotate a vector (spin it around the origin), scale it (make it bigger or smaller), reflect it (flip it like a mirror), or shear it (slant it sideways). In 3D, it can do all of these simultaneously.
Why matrices matter in ML
A neural network layer with 512 neurons and 256 inputs is a 512×256 matrix — 131,072 weights. The forward pass is just: output = matrix × input. Training adjusts every number in that matrix until it transforms data perfectly for the task.