Overview
A matrix is a rectangular arrangement of elements—typically numbers or algebraic expressions—organized in horizontal rows and vertical columns. Each entry sits at the intersection of a row and a column and is often indexed by its row and column numbers. The contents may be real or complex numbers, symbols, or objects from other algebraic systems. Diagrams that illustrate these positions are common in textbooks and online resources; see an example diagram here: matrix diagram.
Structure and notation
Matrices are usually denoted by capital letters such as A, B or C. A matrix with m rows and n columns is called an m-by-n matrix and written m×n. A single row is called a row vector and a single column a column vector. Special matrices include the zero matrix, identity matrix, diagonal matrices and triangular matrices. Square matrices have the same number of rows and columns and support additional concepts like the determinant and trace.
Core operations
Operations on matrices generalize arithmetic for numbers but follow distinct rules:
- Addition and subtraction: Two matrices of the same size are added or subtracted entrywise (add, subtract).
- Scalar multiplication: Each entry is multiplied by a scalar.
- Matrix multiplication: The product of an m×n matrix and an n×p matrix is an m×p matrix obtained by summing products of row entries with corresponding column entries; multiplication is generally noncommutative (multiply).
- Transpose, inverse and determinant: The transpose switches rows and columns. Square matrices may have inverses and determinants, concepts central to solving linear systems.
Matrices can also be extended to higher-dimensional arrays (often called tensors) or used as one-dimensional arrays (higher dimensions).
Types, properties and examples
Important matrix classes include:
- Identity matrix: Acts like 1 for multiplication.
- Diagonal and scalar matrices: Nonzero entries only on the main diagonal.
- Symmetric and skew-symmetric: Relations with their transpose.
- Sparse matrices: Most entries zero; exploited for computational efficiency.
Example uses are solving linear systems, representing linear maps, and encoding graphs via adjacency matrices. Many computational algorithms optimize specific matrix structures for speed and storage.
History and development
The idea of arranging numbers in arrays dates back centuries in practical calculation and Chinese mathematics; in modern form the matrix concept and its algebraic properties were developed during the 18th and 19th centuries alongside the study of determinants and linear transformations. By the 20th century matrices became central to linear algebra and numerical analysis, with systematic notation and computational methods that underpin modern scientific computing.
Applications and significance
Matrices are fundamental in many disciplines: universities teach them early in courses like linear algebra. They appear in computer science (graphics, algorithms, machine learning), engineering (systems and control), physics (quantum mechanics, tensors), economics (input–output models) and statistics (covariance, regression). Matrices provide a concise way to describe and compute linear relationships, perform coordinate changes, and model networks and data transformations.
Notable distinctions: a matrix is an array with algebraic operations defined on it; a tensor generalizes this to multilinear maps. Arrays in programming may store data similarly but may lack mathematical operations unless provided by a library.