matrix algebra
Matrices
You should know: vectors
Overview
A matrix is a rectangular array of numbers arranged in rows and columns. Matrices are the workhorse data structure of linear algebra: they encode systems of linear equations, represent linear transformations between vector spaces, and store data (images, graphs, networks) in a form that algebraic operations can act on directly. Every matrix has a shape — m rows by n columns, written m × n — and the entry in row i, column j is written aᵢⱼ.
Intuition
Think of a matrix as a machine: feed it a vector, and it hands back a new vector, produced by a fixed recipe of scaling and combining the input's components. A spreadsheet is a good mental model too — rows and columns of numbers you can add to another same-shaped spreadsheet, scale by a constant, or (with the right rule) multiply against another spreadsheet to combine two sets of linear relationships into one. The power of matrices is that this single rectangular object can represent a rotation, a system of equations, a graph's connections, or a black-and-white image, all manipulated by the same small set of algebraic rules.
Formal Definition
An m × n matrix A over a field (typically ℝ) is a rectangular array with m rows and n columns, indexed so that aᵢⱼ denotes the entry in row i and column j:
An m×n matrix indexed by row i and column j
Matrix addition — entrywise, requires A and B to have the same shape
Scalar multiplication — every entry scaled by c
Notation
| Notation | Meaning |
|---|---|
| A matrix, typically denoted by an uppercase bold or italic letter | |
| The entry in row i, column j of A | |
| Transpose of A — rows and columns swapped, (Aᵀ)ᵢⱼ = Aⱼᵢ | |
| The n×n identity matrix — 1s on the diagonal, 0 elsewhere | |
| The zero matrix — every entry is 0 | |
| The set of all m×n matrices with real entries |
Derivation
A matrix arises naturally when writing a system of m linear equations in n unknowns. Consider the system a₁₁x₁ + a₁₂x₂ + … + a₁ₙxₙ = b₁, and similarly for rows 2 through m. Separating the coefficients from the unknowns and constants gives exactly the matrix equation Ax = b — the matrix A is literally 'the array of coefficients', and matrix-vector multiplication is defined precisely so that Ax reproduces the left-hand sides of the original equations:
The i-th linear equation in the system
Rewriting the whole system as one matrix equation, defining matrix-vector multiplication
A concrete 3×4 coefficient matrix
Properties
Addition is commutative and associative
Scalar multiplication distributes
Transpose of a transpose
Transpose of a sum
Additive identity
Square, symmetric, diagonal matrices
Applications
Formula Explorer
Worked Examples
Add entrywise.
Scale every entry by 2.
Answer: A+B = [[6,8],[10,12]]; 2A = [[2,4],[6,8]]
Practice Problems
Given A = [[2, -1], [0, 3]] and B = [[1, 4], [-2, 5]], compute A − B.
If A is a 4×3 matrix, what is the shape of Aᵀ?
A matrix A is symmetric, meaning A = Aᵀ. If A is 5×7, is this possible?
Common Mistakes
Trying to add or subtract two matrices of different shapes.
Matrix addition/subtraction is only defined for matrices of identical shape (same number of rows AND columns) — it is entrywise, so mismatched shapes have no corresponding entries to combine.
Confusing the row/column convention — writing aᵢⱼ but meaning 'column i, row j'.
The universal convention is aᵢⱼ = entry in ROW i, COLUMN j (row index always comes first). An m×n matrix has m rows and n columns — mixing this up is a common source of dimension errors later in matrix multiplication.
Assuming every square matrix is symmetric or diagonal.
Being square (n×n) is necessary but nowhere near sufficient for symmetry (A=Aᵀ) or diagonality (zero off-diagonal entries) — these are extra, much stronger conditions.
Quiz
Flashcards
Historical Background
Arrays of coefficients for solving systems of linear equations appear as early as the Chinese text The Nine Chapters on the Mathematical Art (c. 200 BCE), which describes a method equivalent to Gaussian elimination on such an array. The modern theory of matrices developed in the 19th century: James Joseph Sylvester coined the term 'matrix' (Latin for 'womb', as a matrix 'gives birth to' its determinants) in 1850, and Arthur Cayley developed matrix algebra — including matrix multiplication and inverses — in his 1858 Memoir on the Theory of Matrices, treating matrices as objects in their own right rather than mere bookkeeping for equations.
- c. 200 BCE
The Nine Chapters on the Mathematical Art describes a rectangular-array method for solving linear systems, equivalent to Gaussian elimination
- 1850
Sylvester coins the term 'matrix'
James Joseph Sylvester
- 1858
Cayley publishes A Memoir on the Theory of Matrices, founding matrix algebra as an independent subject
Arthur Cayley
- 1920s
Heisenberg's matrix mechanics formulation of quantum mechanics makes matrices central to modern physics
Werner Heisenberg
Summary
- A matrix is a rectangular array of numbers, aᵢⱼ denoting the entry in row i, column j.
- Addition and scalar multiplication are entrywise; addition requires matching shapes.
- The transpose Aᵀ swaps rows and columns, turning an m×n matrix into an n×m matrix.
- Matrices arise naturally as the coefficient array of a linear system, giving the compact form Ax = b.
- Cayley formalized matrix algebra in 1858; matrices now underlie graphics, ML, quantum mechanics, and graph theory alike.
References
- BookStrang, G. Introduction to Linear Algebra, 5th ed. Ch. 1.
- PaperCayley, A. (1858). A Memoir on the Theory of Matrices. Philosophical Transactions of the Royal Society of London.
Mathematics