1. Number and Algebra

Matrices And Matrix Operations

Matrices and Matrix Operations

Matrices are one of the most useful tools in mathematics because they help organize and solve many real-world problems at once 📊. students, you may already know how to work with single numbers and algebraic expressions, but matrices let us handle groups of numbers in a structured way. In IB Mathematics: Applications and Interpretation HL, matrices connect ideas from number systems, algebraic manipulation, sequences, modelling, and technology-supported interpretation.

In this lesson, you will learn the main ideas and vocabulary behind matrices, how to perform basic matrix operations, and why matrices are so important in applications such as business, population studies, networks, and transformation geometry. By the end, you should be able to recognize a matrix, describe its dimensions, add and multiply matrices correctly, and understand how matrix methods support mathematical modelling.

What is a matrix?

A matrix is a rectangular arrangement of numbers written in rows and columns. For example,

$$A=\begin{pmatrix}1 & 2\\3 & 4\end{pmatrix}$$

is a matrix with two rows and two columns. The numbers inside are called entries or elements.

The size of a matrix is written using rows by columns. So matrix $A$ above has size $2\times 2$. A matrix with $3$ rows and $2$ columns has size $3\times 2$.

Matrices are useful when data naturally comes in tables. For example, a school might record the number of students in different year levels and sports teams, or a company might record sales in different regions over several months. Instead of writing many separate equations, a matrix gives a compact way to store and process the data.

There are special types of matrices you should know:

  • A row matrix has one row.
  • A column matrix has one column.
  • A square matrix has the same number of rows and columns.
  • A zero matrix has all entries equal to $0$.
  • The identity matrix has $1$ values on the main diagonal and $0$ elsewhere, such as

$$I=\begin{pmatrix}1 & 0\\0 & 1\end{pmatrix}$$

for size $2\times 2$.

The identity matrix acts like $1$ in multiplication, which is a powerful idea in algebra.

Adding, subtracting, and scalar multiplication

Matrices can be added or subtracted only when they have the same dimensions. If

$$A=\begin{pmatrix}a & b\c & d\end{pmatrix}$$

and

$$B=\begin{pmatrix}e & f\g & h\end{pmatrix},$$

then

$$A+B=\begin{pmatrix}a+e & b+f\c+g & d+h\end{pmatrix}$$

and

$$A-B=\begin{pmatrix}a-e & b-f\c-g & d-h\end{pmatrix}.$$

This is called element-by-element operation. Every entry is treated in the same position.

Example:

$$\begin{pmatrix}2 & -1\\5 & 3\end{pmatrix}+\begin{pmatrix}4 & 6\\-2 & 1\end{pmatrix}=\begin{pmatrix}6 & 5\\3 & 4\end{pmatrix}.$$

Scalar multiplication means multiplying every entry by a single number. If $k$ is a scalar and $A$ is a matrix, then $kA$ is the matrix obtained by multiplying every entry in $A$ by $k$.

Example:

$$3\begin{pmatrix}1 & 2\\-4 & 0\end{pmatrix}=\begin{pmatrix}3 & 6\\-12 & 0\end{pmatrix}.$$

These operations are very useful in modelling. For example, if one dataset changes by the same amount across all categories, scalar multiplication can represent that change. If two effects act together, matrix addition can combine them.

Matrix multiplication and why it is different

Matrix multiplication is one of the most important and most carefully defined operations. Unlike addition, matrices do not need to have the same size, but their dimensions must be compatible.

If $A$ is a matrix of size $m\times n$ and $B$ is a matrix of size $n\times p$, then the product $AB$ exists and has size $m\times p$. The number of columns in $A$ must match the number of rows in $B$.

This rule is essential. If the sizes do not match, the multiplication is undefined.

To multiply, take each row of the first matrix and each column of the second matrix, then form a dot product. For

$$A=\begin{pmatrix}a & b\c & d\end{pmatrix}$$

and

$$B=\begin{pmatrix}e & f\g & h\end{pmatrix},$$

we get

$$AB=\begin{pmatrix}ae+bg & af+bh\ce+dg & cf+dh\end{pmatrix}.$$

Example:

$$\begin{pmatrix}1 & 2\\3 & 4\end{pmatrix}\begin{pmatrix}5 & 6\\7 & 8\end{pmatrix}=\begin{pmatrix}19 & 22\\43 & 50\end{pmatrix}.$$

Notice that matrix multiplication is usually not commutative, which means $AB$ is not always equal to $BA$. In the example above,

$$\begin{pmatrix}1 & 2\\3 & 4\end{pmatrix}\begin{pmatrix}5 & 6\\7 & 8\end{pmatrix}\ne\begin{pmatrix}5 & 6\\7 & 8\end{pmatrix}\begin{pmatrix}1 & 2\\3 & 4\end{pmatrix}.$$

This is a big difference from ordinary multiplication of numbers, and it is a common place where students make mistakes. students, always check dimensions first ✅.

The identity matrix, inverses, and solving systems

The identity matrix is a matrix that leaves another matrix unchanged when multiplied on the correct side. For a square matrix $A$,

$$AI=IA=A$$

where $I$ is the identity matrix of matching size.

Some matrices have an inverse. If a square matrix $A$ has an inverse $A^{-1}$, then

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

Not every matrix has an inverse. A matrix with no inverse is called singular. A matrix with an inverse is called non-singular or invertible.

For a $2\times 2$ matrix

$$A=\begin{pmatrix}a & b\c & d\end{pmatrix},$$

its determinant is

$$\det(A)=ad-bc.$$

If

$$\det(A)\ne 0,$$

then the inverse exists and is

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

Example:

$$A=\begin{pmatrix}2 & 1\\5 & 3\end{pmatrix},\qquad \det(A)=2\cdot 3-1\cdot 5=1.$$

Since the determinant is not zero,

$$A^{-1}=\begin{pmatrix}3 & -1\\-5 & 2\end{pmatrix}.$$

Matrices can solve systems of linear equations. For example,

$$x+y=5$$

and

$$2x+3y=12$$

can be written as

$$\begin{pmatrix}1 & 1\\2 & 3\end{pmatrix}\begin{pmatrix}x\y\end{pmatrix}=\begin{pmatrix}5\\12\end{pmatrix}.$$

If the inverse exists, then

$$\begin{pmatrix}x\y\end{pmatrix}=A^{-1}\begin{pmatrix}5\\12\end{pmatrix}.$$

This is a major link between matrices and algebraic representation.

Matrices in modelling and real-world applications

Matrices are especially valuable in IB AI HL because they support numerical modelling and technology-based interpretation. One common use is storing and processing data. Suppose a store records sales of two products over three days:

$$S=\begin{pmatrix}12 & 15 & 18\\8 & 10 & 11\end{pmatrix}.$$

The first row may represent product $A$, and the second row product $B$. The columns represent Monday, Tuesday, and Wednesday. A matrix like this makes patterns easier to compare.

Matrices also model transformations in geometry. For example, a $2\times 2$ matrix can represent a rotation, reflection, stretch, or shear of points in the plane. If a point is written as a column vector,

$$\begin{pmatrix}x\y\end{pmatrix},$$

then multiplying by a transformation matrix gives a new point. This is useful in graphics, architecture, robotics, and computer animation 🎮.

Example of a $90^\circ$ anticlockwise rotation:

$$R=\begin{pmatrix}0 & -1\\1 & 0\end{pmatrix}.$$

Applying it to

$$\begin{pmatrix}2\\3\end{pmatrix}$$

gives

$$\begin{pmatrix}-3\\2\end{pmatrix}.$$

That means the point moves from $(2,3)$ to $(-3,2)$.

Matrices also appear in sequences and financial models. Repeated multiplication by a matrix can describe growth over time, especially when quantities depend on previous values. For example, population changes between groups or money flowing through several accounts can be represented using matrix methods. This connects directly to the syllabus idea of technology-supported interpretation, since software can quickly compute repeated matrix products for large systems.

Common mistakes and how to avoid them

There are several important errors to watch for:

  • Adding matrices of different sizes is not allowed.
  • Multiplication is only defined when the inner dimensions match.
  • Matrix multiplication is not commutative, so $AB$ may not equal $BA$.
  • When finding an inverse for a $2\times 2$ matrix, remember the formula uses the determinant.
  • Always keep track of whether vectors are rows or columns.

A good habit is to label dimensions before you calculate. For example, if $A$ is $2\times 3$ and $B$ is $3\times 1$, then $AB$ exists and has size $2\times 1$. But $BA$ does not exist because $1\ne 2$ in the required inner dimensions.

Using technology can help check answers, but you should still understand the method. Software can multiply matrices instantly, yet the reasoning behind the operation is what matters in IB Mathematics: Applications and Interpretation HL.

Conclusion

Matrices bring structure to information and give mathematicians a powerful way to model the real world. They connect naturally to algebra because they can represent systems of equations, transformations, and repeated processes. In Number and Algebra, matrices show how number patterns, symbolic methods, and modelling can work together. students, if you understand matrix size, addition, scalar multiplication, multiplication, identity matrices, and inverses, you have built a strong foundation for later topics in mathematics and applications such as finance, data analysis, and geometry.

Study Notes

  • A matrix is a rectangular array of numbers arranged in rows and columns.
  • The size of a matrix is written as $m\times n$, meaning $m$ rows and $n$ columns.
  • Matrices can be added or subtracted only when they have the same dimensions.
  • Scalar multiplication means multiplying every entry by the same number.
  • Matrix multiplication is defined when the number of columns in the first matrix equals the number of rows in the second.
  • In general, $AB\ne BA$.
  • The identity matrix satisfies $AI=IA=A$.
  • A matrix is invertible if an inverse exists, satisfying $AA^{-1}=A^{-1}A=I$.
  • For a $2\times 2$ matrix $\begin{pmatrix}a & b\c & d\end{pmatrix}$, the determinant is $ad-bc$.
  • If $ad-bc\ne 0$, the inverse is $\frac{1}{ad-bc}\begin{pmatrix}d & -b\\-c & a\end{pmatrix}$.
  • Matrices are used in solving systems of equations, modelling transformations, and analysing real-world data.
  • In IB Mathematics: Applications and Interpretation HL, matrices support numerical modelling and technology-based problem solving.

Practice Quiz

5 questions to test your understanding