Matrices: Your Guide to Organised Numbers

Hello! Welcome to the world of matrices. Don't let the fancy name intimidate you. A matrix is just a neat way to organise numbers in a grid. Think of a class timetable, a video game scoreboard, or even a spreadsheet – they all use the same idea! In this chapter, we'll learn how to work with these grids: adding, subtracting, multiplying, and even "dividing" them. It's a powerful tool used in everything from computer graphics to solving complex equations, so let's get started!


1. What is a Matrix? The Basics

A matrix is simply a rectangular grid of numbers, called elements, arranged in rows (horizontal) and columns (vertical).

The size or dimension (also called order) of a matrix is given by (number of rows) x (number of columns).

Example: Here is a matrix A with 2 rows and 3 columns. Its dimension is 2x3.

$$ A = \begin{pmatrix} 1 & -5 & 3 \\ 4 & 0 & 7 \end{pmatrix} $$

To talk about a specific element, we use the notation aij, where i is the row number and j is the column number. For matrix A above:

  • The element in the 1st row, 2nd column is a12 = -5.
  • The element in the 2nd row, 3rd column is a23 = 7.
Special Types of Matrices
  • Square Matrix: Has the same number of rows and columns (e.g., 2x2, 3x3).
  • Zero Matrix (O): A matrix where every single element is 0. It's the "zero" of the matrix world.
  • Identity Matrix (I): The "one" of the matrix world! It's a square matrix with 1s on the main diagonal (top-left to bottom-right) and 0s everywhere else.
$$ I_2 = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \quad \text{and} \quad I_3 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} $$
Key Takeaway

A matrix is a grid of numbers. Its size is called its dimension (rows x columns). The identity matrix I and zero matrix O are special matrices that are very important in matrix algebra.


2. Matrix Operations: The Basic Rules

Matrix Addition and Subtraction

This is the easy part! You can only add or subtract matrices if they have the exact same dimensions.

How to do it: Simply add or subtract the corresponding elements.

Analogy: Imagine you have two shopping lists for two different weeks, written in the same layout. To find the total items you bought, you just add the numbers in the same positions.

Example: Let's add two 2x2 matrices.

$$ A = \begin{pmatrix} 4 & 8 \\ 3 & 7 \end{pmatrix}, \quad B = \begin{pmatrix} 1 & 0 \\ 5 & 2 \end{pmatrix} $$ $$ A + B = \begin{pmatrix} 4+1 & 8+0 \\ 3+5 & 7+2 \end{pmatrix} = \begin{pmatrix} 5 & 8 \\ 8 & 9 \end{pmatrix} $$

Common Mistake: Never try to add or subtract matrices with different dimensions! It's not possible.

Example: You cannot add a 2x3 matrix and a 2x2 matrix.

Scalar Multiplication

A scalar is just a fancy word for a regular number (not a matrix). Scalar multiplication means multiplying a matrix by a number.

How to do it: Multiply every single element inside the matrix by the scalar.

Analogy: If you want to double a recipe, you multiply every ingredient's quantity by 2.

Example: Find 3A for the matrix A below.

$$ A = \begin{pmatrix} 2 & -1 \\ 5 & 9 \end{pmatrix} $$ $$ 3A = 3 \begin{pmatrix} 2 & -1 \\ 5 & 9 \end{pmatrix} = \begin{pmatrix} 3 \times 2 & 3 \times (-1) \\ 3 \times 5 & 3 \times 9 \end{pmatrix} = \begin{pmatrix} 6 & -3 \\ 15 & 27 \end{pmatrix} $$
Quick Review: Basic Properties

For matrices A, B, C of the same size and scalars λ, μ:

  • Commutative Law of Addition: $$ A + B = B + A $$ (The order of addition doesn't matter).
  • Associative Law of Addition: $$ (A + B) + C = A + (B + C) $$ (The way you group them for addition doesn't matter).
  • Distributive Laws:
    $$ \lambda(A + B) = \lambda A + \lambda B $$ $$ (\lambda + \mu)A = \lambda A + \mu A $$
Key Takeaway

Adding and subtracting matrices is straightforward: just work with corresponding elements, but make sure the dimensions match. For scalar multiplication, multiply every element by the scalar.


3. Matrix Multiplication: The Tricky Bit!

Don't worry if this seems confusing at first! Matrix multiplication is the most complex operation, but it follows a very specific pattern. Once you get the hang of it, it's just a repetitive process.

The Golden Rule of Multiplication

You can only multiply two matrices, say A x B, if the number of columns in A is equal to the number of rows in B.

Memory Aid: Check the inner dimensions. If matrix A is m x n and matrix B is n x p, you can multiply them because the inner dimensions 'n' match. The resulting matrix will have the outer dimensions: m x p.

$$ (m \times \mathbf{n}) \cdot (\mathbf{n} \times p) \longrightarrow (m \times p) $$

How to Multiply: Step-by-Step

The rule is "Rows by Columns". To get the element in the i-th row and j-th column of the new matrix, you multiply the elements of the i-th row of the first matrix by the corresponding elements of the j-th column of the second matrix, and then add them all up.

Example: Let's calculate AB.

$$ A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}, \quad B = \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix} $$

The result AB will be a 2x2 matrix, let's call it C.

$$ C = \begin{pmatrix} c_{11} & c_{12} \\ c_{21} & c_{22} \end{pmatrix} $$
  • To find c11 (Row 1, Col 1): Use Row 1 of A and Column 1 of B. $$ c_{11} = (1 \times 5) + (2 \times 7) = 5 + 14 = 19 $$
  • To find c12 (Row 1, Col 2): Use Row 1 of A and Column 2 of B. $$ c_{12} = (1 \times 6) + (2 \times 8) = 6 + 16 = 22 $$
  • To find c21 (Row 2, Col 1): Use Row 2 of A and Column 1 of B. $$ c_{21} = (3 \times 5) + (4 \times 7) = 15 + 28 = 43 $$
  • To find c22 (Row 2, Col 2): Use Row 2 of A and Column 2 of B. $$ c_{22} = (3 \times 6) + (4 \times 8) = 18 + 32 = 50 $$

So, the final result is:

$$ AB = \begin{pmatrix} 19 & 22 \\ 43 & 50 \end{pmatrix} $$

The Big Surprise: AB is NOT always equal to BA!

This is a huge difference from regular numbers. Matrix multiplication is not commutative. The order you multiply in matters!

Using the same matrices from above, if you try to calculate BA, you'll get a different answer. This is a very important property to remember.

Properties of Matrix Multiplication

Even though it's not commutative, it does have some useful properties:

  • Associative Law: $$ A(BC) = (AB)C $$ (Grouping doesn't matter).
  • Distributive Laws: $$ A(B+C) = AB + AC $$ and $$ (A+B)C = AC + BC $$
  • Scalar Property: $$ (\lambda A)(\mu B) = (\lambda \mu)AB $$
  • Determinant Property: $$ |AB| = |A||B| $$ (The determinant of a product is the product of their determinants. Super useful!)
Key Takeaway

Matrix multiplication requires the inner dimensions to match. Remember the "Rows by Columns" rule. Crucially, the order of multiplication matters: AB ≠ BA in general.


4. The Inverse of a Matrix: The "Undo" Button

What is an Inverse?

In regular algebra, the inverse of 5 is 1/5, because 5 x (1/5) = 1. In the matrix world, the inverse of a matrix A is another matrix, written as A-1, that "undoes" A.

When you multiply a matrix by its inverse, you get the Identity Matrix, I.

$$ AA^{-1} = A^{-1}A = I $$

Important points:

  • Only square matrices can have an inverse.
  • A matrix that has an inverse is called invertible or non-singular.
  • A matrix that does not have an inverse is called non-invertible or singular.
  • A matrix has an inverse if and only if its determinant is NOT zero. If det(A) = 0, there is no inverse!

Finding the Inverse of a 2x2 Matrix

There is a simple formula for finding the inverse of a 2x2 matrix. You should memorise this!

If $$ A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} $$, then the inverse is:

$$ A^{-1} = \frac{1}{ad-bc} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} $$

The term ad-bc is the determinant of the matrix.

Step-by-Step Guide (2x2):
  1. Calculate the determinant: det(A) = ad - bc.
  2. Check if it's zero. If det(A) = 0, STOP. The inverse does not exist.
  3. Create a new matrix:
    • Swap the elements on the main diagonal (a and d).
    • Change the sign of the other two elements (b and c).
  4. Multiply the new matrix by 1/det(A).

Example: Find the inverse of $$ M = \begin{pmatrix} 4 & 7 \\ 2 & 6 \end{pmatrix} $$

  1. det(M) = (4)(6) - (7)(2) = 24 - 14 = 10. (It's not zero, so we can continue!)
  2. Swap 4 and 6, change signs of 7 and 2: $$ \begin{pmatrix} 6 & -7 \\ -2 & 4 \end{pmatrix} $$
  3. Multiply by 1/10: $$ M^{-1} = \frac{1}{10} \begin{pmatrix} 6 & -7 \\ -2 & 4 \end{pmatrix} = \begin{pmatrix} 0.6 & -0.7 \\ -0.2 & 0.4 \end{pmatrix} $$

Finding the Inverse of a 3x3 Matrix

This is a longer process, but it's very systematic. We use a method involving the determinant and the "adjugate" matrix.

Quick Concept: Matrix Transpose

The transpose of a matrix (written as AT) is found by flipping the matrix over its main diagonal. The rows become columns and the columns become rows.

Example: If $$ A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix} $$, then $$ A^T = \begin{pmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{pmatrix} $$

Step-by-Step Guide (3x3):
  1. Calculate the determinant of the 3x3 matrix. If it's zero, STOP. No inverse exists.
  2. Find the Matrix of Minors. For each element, cover up its row and column and calculate the determinant of the 2x2 matrix that remains.
  3. Create the Matrix of Cofactors. Apply a "checkerboard" pattern of signs (+, -, +, -, etc.) to the Matrix of Minors. $$ \begin{pmatrix} + & - & + \\ - & + & - \\ + & - & + \end{pmatrix} $$
  4. Find the Adjugate Matrix (adj(A)). This is the transpose of the Matrix of Cofactors. (adj(A) = CT).
  5. Calculate the inverse using the formula: $$ A^{-1} = \frac{1}{\det(A)} \text{adj}(A) $$

This process is best learned through practice. Take your time with each step!

Properties of Inverses

Let A and B be invertible matrices and λ be a non-zero scalar.

  • Unique: The inverse of a matrix is unique.
  • Double Inverse: $$ (A^{-1})^{-1} = A $$ (Undoing an undo takes you back to the start).
  • Scalar Inverse: $$ (\lambda A)^{-1} = \frac{1}{\lambda} A^{-1} $$
  • Transpose Inverse: $$ (A^T)^{-1} = (A^{-1})^T $$
  • Determinant of Inverse: $$ |A^{-1}| = \frac{1}{|A|} $$
  • Product Inverse (Socks and Shoes Rule): $$ (AB)^{-1} = B^{-1}A^{-1} $$ Analogy: To undo putting on socks then shoes, you must take off your shoes FIRST, then your socks. The order is reversed!
Key Takeaway

The inverse A-1 "undoes" a matrix A, giving the identity matrix I. A matrix only has an inverse if its determinant is non-zero. Remember the formula for 2x2 inverses and the "Socks and Shoes" rule for the inverse of a product.