Introduction to Matrices
A matrix is a rectangular array of numbers arranged in rows and columns. Matrices are a powerful tool for storing, manipulating, and solving problems involving large amounts of data in a structured way.
Order of a Matrix
The order (or dimension) of a matrix is given by the number of rows followed by the number of columns (rows x columns). For example, a matrix with 2 rows and 3 columns has an order of 2 x 3.
Types of Matrices
Different types of matrices have specific properties and uses:
- Row Matrix: A matrix with only one row (e.g., a 1 x 4 matrix).
- Column Matrix: A matrix with only one column (e.g., a 3 x 1 matrix). Crucial for representing states in transition models.
- Square Matrix: Has an equal number of rows and columns (n x n). A prerequisite for having an inverse.
- Identity Matrix (I): A square matrix with 1s on the main diagonal and 0s elsewhere. It is the multiplicative identity.
- Zero Matrix: A matrix of any order where all elements are zero.
Matrix Arithmetic
Matrices can be added, subtracted, and multiplied according to a specific set of rules. Understanding these rules and their conditions is fundamental.
Addition and Subtraction
To add or subtract matrices, they must have the same order. The operation is performed by adding or subtracting the corresponding elements.
Scalar Multiplication
To multiply a matrix by a scalar (a single number), you multiply every element within the matrix by that scalar.
Matrix Multiplication (A × B)
For two matrices A and B to be multiplied in the order A × B, the number of columns in A must equal the number of rows in B. The resulting matrix will have the order (rows of A) x (columns of B).
Important: Matrix multiplication is not commutative, which means A × B ≠ B × A.
Solving Simultaneous Equations
A system of linear equations can be represented and solved efficiently using matrix algebra. The key is the inverse matrix.
The Determinant (det(A))
The determinant is a single value calculated from a square matrix. For a 2×2 matrix A = [[a, b], [c, d]], the determinant is det(A) = ad - bc
.
If det(A) = 0, the matrix is singular and has no inverse. This means no unique solution exists for the corresponding system of equations.
The Inverse Matrix (A⁻¹)
The inverse of a square matrix A is a unique matrix A⁻¹ such that A × A⁻¹ = I (the identity matrix). Only non-singular matrices have an inverse.
For a 2×2 matrix, A⁻¹ = (1/det(A)) * [[d, -b], [-c, a]]
.
Solving with Matrices
A system of equations can be written in the form AX = B, where A is the matrix of coefficients, X is the matrix of variables, and B is the matrix of constants.
The solution is found by pre-multiplying both sides by the inverse of A, giving the formula X = A⁻¹B
.
Modelling Change: Transition Matrices
Transition matrices are used to model dynamic systems where states change over discrete time intervals, such as population shifts or customer loyalty changes.
Key Components
- State Matrix (S): A column matrix that shows the number or proportion in each state at a given time. S₀ is the initial state.
- Transition Matrix (T): A square matrix where each element represents the probability or proportion of transitioning from one state to another. The columns of T must always sum to 1.
Predicting Future States
To find the state of the system after one time period, we use the rule S₁ = T × S₀
.
To find the state after ‘n’ periods, the rule is Sₙ = Tⁿ × S₀
.
Steady State
In many systems, after a large number of transitions, the state matrix will approach a steady state or long-term equilibrium, where the proportions in each state no longer change. This can be observed when Tⁿ becomes stable.
Transition Matrix Modeller
Visually explore how a system changes over time. Set up an initial state and a transition matrix, then use the slider to see the state evolve.
Initial State (S₀)
Transition Matrix (T)
Matrix Operations Calculator
Practice matrix arithmetic. Define your matrices below and select an operation to see the result.
Matrix A (2×2)
Matrix B (2×2)
Result will be displayed here.