Math · Linear Algebra
Matrices
A matrix is a structured collection of numbers. Edit one to see how its rows and columns combine vectors, data, and operations.
Concept
A vector is an ordered collection of components. A matrix is an ordered collection of entries arranged in rows and columns. It can record relationships, combine values, or act on a vector.
Equation
Manipulate
Choose a shape and edit .
Addition
Matrices can be added only when they have the same dimensions. That makes every entry in one matrix correspond to exactly one entry in the other.
Scalar multiplication
Matrix × vector
This is the central operation: each row of A takes a dot product with the input vector and produces one output component. Select a row calculation to trace it.
Matrix × matrix
For and , the matching inner dimensions allow multiplication, and the outer dimensions give .
Observe
The identity matrix leaves a vector unchanged: , and it satisfies . The zero matrix sends every vector to zero: . Try the Identity and Swap presets to see both ideas.
Explain
Matrix multiplication is not just a rule for filling cells. It describes composition: first use B to combine values, then use A to combine the result. Reversing that order can produce a different answer.
Computing, data & machine learning
Datasets use rows for observations and columns for features. Images are grids of pixel values. Graphics uses matrices to encode transformations. In machine learning, a layer is often summarized as : is an input vector, is a weight matrix, is a bias vector, and is an output vector.
Matrix transformations
What happens to the whole coordinate plane when every vector is multiplied by A?