Matrix Operations and Inverses
What You’ll Learn
Section titled “What You’ll Learn”Matrices can look intimidating at first, but don’t sweat it. This is an introduction, and you’ll revisit all of this in Linear Algebra with way more depth. For now, just get comfortable with the mechanics.
In this lesson you’ll learn how to add, subtract, and multiply matrices, find the inverse of a 2x2 matrix, and understand when an inverse exists. You worked with matrices briefly in Algebra 2 for solving systems. Here we go deeper into the operations themselves.
The Concept
Section titled “The Concept”A matrix is a rectangular array of numbers arranged in rows and columns. A 2x3 matrix has 2 rows and 3 columns. We name entries by their position: the entry in row i, column j is written as a_ij.
Matrix addition and subtraction work entry by entry (the matrices must be the same size):
Scalar multiplication multiplies every entry by the scalar:
Matrix multiplication is the interesting one. To multiply A times B, you take each row of A and “dot” it with each column of B. The number of columns in A must equal the number of rows in B.
Here’s how it works. To find entry (1,1) of the result, take Row 1 of A and Column 1 of B, multiply the matching pairs, and add:
The blue 1 multiplies the blue 5, and the gold 3 multiplies the gold 7:
You repeat this for every row-column pair to fill in the whole result matrix.
Matrix multiplication is not commutative. In general, AB does not equal BA. Order matters.
The identity matrix I acts like the number 1: AI = IA = A.
The inverse of a 2x2 matrix (when it exists) is:
where ad - bc is the determinant. If the determinant is zero, the matrix has no inverse (it’s singular).
Worked Example
Section titled “Worked Example”Example 1: Matrix multiplication
Row 1 dot Col 1: (1)(5) + (3)(7) = 26
Row 1 dot Col 2: (1)(6) + (3)(8) = 30
Row 2 dot Col 1: (2)(5) + (4)(7) = 38
Row 2 dot Col 2: (2)(6) + (4)(8) = 44
Example 2: Finding an inverse
Find the inverse of A:
Determinant: (4)(6) - (7)(2) = 24 - 14 = 10
Verify: multiply A by its inverse and you should get the identity matrix.
Real-World Application
Section titled “Real-World Application”Matrices are used in:
- Computer graphics (transformations: rotation, scaling, translation)
- Data science (datasets are stored as matrices)
- Economics (input-output models, Leontief models)
- Engineering (circuit analysis, structural mechanics)
- Machine learning (neural networks are layers of matrix multiplications)
Example: every time you rotate an image on your phone, the device multiplies each pixel’s coordinates by a rotation matrix. A 90-degree counterclockwise rotation uses the matrix [[0, -1], [1, 0]].