A matrix is a rectangular grid of numbers. That sounds dull, but a matrix is really two things at once: a tidy way to store numbers, and a machine that takes in a vector and puts out another. The second view is what makes linear algebra powerful.
A grid of numbers
We write a matrix as rows and columns, for example
Its size is given as rows by columns; this one is . The plainest use is bookkeeping: a spreadsheet, a table of coefficients, the pixels of an image.
The matrix-vector product
The magic is how a matrix acts on a vector. To multiply by a vector, you combine the vector's entries with the matrix's columns. For the matrix above acting on :
Read that carefully: the output is a linear combination of the matrix's columns, weighted by the vector's entries. A matrix feeds a vector in and returns a new vector: it is a function.
Systems of equations
This is also why matrices tame systems of equations. A tangle of linear equations like
collapses into the single compact statement , where . Solving the system means finding the input vector that the machine sends to . All the messy algebra of substitution becomes one clean question about a matrix.
Combining machines
Because matrices are functions, you can chain them: apply one, then another. That chaining is matrix multiplication, and the order matters: doing then is generally not the same as then , just as putting on socks then shoes is not the same as shoes then socks. The next lesson makes the "machine" view precise: every matrix is a transformation of space.