Matrices and Their Components
A matrix is a rectangular array of numbers (or expressions) arranged in rows and columns. Matrices give you a structured way to organize data and perform operations on entire sets of numbers at once. They show up everywhere: solving systems of equations, transforming shapes in computer graphics, and modeling real-world systems in economics and science.

Definition and Elements
Each individual number in a matrix is called an element (or entry). You identify a specific element by its row and column position. For example, refers to the element in the 2nd row and 3rd column of matrix .
Matrix Size and Types
The dimensions of a matrix are written as , where is the number of rows and is the number of columns. A matrix has 3 rows and 2 columns, giving it 6 elements total.
- A square matrix has the same number of rows and columns (like ). The main diagonal runs from the top-left element to the bottom-right element.
- A row vector is a matrix with only one row ().
- A column vector is a matrix with only one column ().
Matrix Operations
Matrix Addition and Subtraction
You can only add or subtract matrices that have the same dimensions. If is and is , the operation is undefined.
When the dimensions do match, you simply add (or subtract) corresponding elements:
So the element in row , column of the result is just the sum of the elements at that same position in and .
Two properties to know:
- Commutative:
- Associative:
Note: Subtraction is commutative only in the sense that . The order still matters for the sign.
Scalar Multiplication
Scalar multiplication means multiplying every element of a matrix by a single number (the scalar). If is a scalar and is a matrix:
For example, if and , then .
Scalar multiplication distributes over matrix addition: .

Matrix Multiplication
Conditions for Matrix Multiplication
Matrix multiplication has a strict compatibility requirement: the number of columns in the first matrix must equal the number of rows in the second matrix.
If is and is , then the product exists and has dimensions . If those inner dimensions don't match, the multiplication is undefined.
Process of Matrix Multiplication
To find element of the product matrix :
- Take the entire th row of .
- Take the entire th column of .
- Multiply corresponding entries together.
- Add all those products.
In summation notation:
Quick example: Suppose is and is . To find , you multiply each element in row 1 of by the corresponding element in column 1 of , then sum: .
Three properties to remember:
- Associative:
- Distributive:
- NOT commutative: in general. This is one of the biggest differences from regular number multiplication. Even when both and are defined, they usually produce different results.
Identity Matrix
The identity matrix is a square matrix with 1s on the main diagonal and 0s everywhere else. For a identity:
It acts like the number 1 in multiplication: , as long as the dimensions are compatible. Think of it as the "do nothing" matrix.
Applications of Matrices

Systems of Linear Equations
Matrices provide a compact way to represent and solve systems of equations. The coefficients of the variables form a coefficient matrix, the variables form a column vector, and the constants form another column vector. A system like:
becomes the matrix equation . You can then solve using techniques like Gaussian elimination, inverse matrices, or Cramer's rule (covered later in this unit).
Computer Graphics
In computer graphics, transformation matrices handle translations, rotations, and scaling of objects in 2D or 3D space. Applying a transformation to every point of an object is just matrix multiplication. Combining multiple transformations (rotate then scale, for instance) means multiplying their matrices together, which is one reason matrix multiplication order matters.
Economics
Input-output models in economics use matrices to describe how industries depend on each other. The input-output matrix tracks the flow of goods and services between sectors, making it possible to analyze how a change in one industry ripples through the rest of the economy.
Physics and Engineering
Matrices represent systems in electric circuit analysis, stress analysis in structural engineering, and quantum mechanics. In quantum mechanics specifically, the states of a system and the operators acting on those states are represented as matrices and vectors.
Population Dynamics
The Leslie matrix models how a population's age structure changes over time, incorporating birth rates and survival rates for each age group. Multiplying the Leslie matrix by a population vector gives you the predicted population distribution for the next time period.
Cryptography
The Hill cipher is a classic example of matrices in cryptography. It uses matrix multiplication to encrypt blocks of letters and the inverse matrix to decrypt them. The security depends on keeping the encryption matrix secret.