A Guide to Matrix Operations: Addition, Multiplication, and Inverses
Matrices are rectangular arrays of numbers that appear throughout mathematics, physics, computer science, and engineering. They provide a compact way to represent and solve systems of linear equations, perform geometric transformations, and organise data.
This guide covers the fundamental matrix operations you need to know, with clear worked examples for each.
What Is a Matrix?
A matrix is an arrangement of numbers in rows and columns. A matrix with rows and columns is called an matrix. For example, this is a matrix:
Matrix Addition and Subtraction
To add or subtract two matrices, they must have the same dimensions. You simply add (or subtract) corresponding entries.
Example 1: Matrix Addition
Add and .
Scalar Multiplication
To multiply a matrix by a scalar (a single number), multiply every entry in the matrix by that scalar.
Example 2: Scalar Multiplication
Matrix Multiplication
To multiply two matrices () and (), the number of columns in must equal the number of rows in . The result is an matrix. Each entry is computed as a dot product:
Example 3: Matrix Multiplication
Multiply by .
Note that matrix multiplication is not commutative. In general, .
Determinants
The determinant is a scalar value associated with a square matrix. It tells you whether the matrix is invertible (non-zero determinant) and has geometric significance related to scaling.
For a matrix:
Example 4: Computing a Determinant
Find the determinant of .
Since the determinant is non-zero, this matrix is invertible.
Matrix Inverse
The inverse of a square matrix is the matrix such that , where is the identity matrix.
For a matrix:
Example 5: Finding the Inverse
Find the inverse of .
We already found .
The Transpose
The transpose of a matrix , written , swaps its rows and columns. If is , then is .
Example 6: Transpose
Key Points
- Dimensions matter. Addition requires matching dimensions. Multiplication requires the inner dimensions to match.
- Order matters in multiplication. in general.
- Zero determinant means no inverse. Such matrices are called singular.
Try It Yourself
Perform matrix calculations with our free Matrix Calculator. It handles addition, multiplication, determinants, inverses, and more, with step-by-step solutions.
Related Articles
How to Calculate Percentages: A Complete Guide with Examples
Learn how to calculate percentages step by step. Covers the core formula, percentage increase and decrease, finding a percentage of a number, and common mistakes to avoid.
How to Find the Derivative: Rules, Formulas, and Worked Examples
Master differentiation with this guide to derivative rules. Covers the power rule, product rule, quotient rule, and chain rule with step-by-step KaTeX examples.
How to Calculate Standard Deviation: Step-by-Step Guide
Understand standard deviation from the ground up. Learn the difference between population and sample standard deviation with a full worked example using a real dataset.