Matrices: Types, Properties, Operations and Worked Examples
4.1 MATRICES
A matrix is a rectangular array of numbers arranged in the form $$ \begin{pmatrix} a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \dots & a_{mn} \end{pmatrix} \quad \text{or } (a_{ij}) \text{ where } 1 \le i \le m \text{ and } 1 \le j \le n,\; i, j \in \mathbb{N} $$
The numbers $a_{11}, a_{12}, \dots, a_{1n}, \dots, a_{m1}, \dots, a_{mn}$ in the array are called the elements or entries of the matrix.
The horizontal lines of number of the array are called the rows of the matrix.
From the above matrix, we have
$(a_{11}, a_{12}, \dots, a_{1n})$ as the first row of the matrix
$(a_{21}, a_{22}, \dots, a_{2n})$ as the second row of the matrix
$$\vdots$$
$(a_{m1}\; a_{m2}\; \dots\; a_{mn})$ as the $m^{\text{th}}$ row of the matrix.
The vertical lines of the numbers of the array are called the columns of the matrix. Thus $$ \begin{pmatrix} a_{11} \\ a_{21} \\ \vdots \\ a_{m1} \end{pmatrix}, \quad \begin{pmatrix} a_{12} \\ a_{22} \\ \vdots \\ a_{m2} \end{pmatrix}, \dots, \quad \begin{pmatrix} a_{1n} \\ a_{2n} \\ \vdots \\ a_{mn} \end{pmatrix} $$ are the first, second and $n^{\text{th}}$ columns of the matrix respectively.
If a matrix has $m$ rows and $n$ columns, it is called an $m \times n$ matrix, (read as ‘$m$ by $n$’ matrix). It is also known as a matrix of order $m \times n$.
The following are examples of matrices.
(a) $\quad \begin{pmatrix} 2 & -1 & 4 \\ 0 & 1 & 3 \end{pmatrix} \quad$ is a $2 \times 3$ matrix.
(b) $\quad \begin{pmatrix} 1 & 7 \\ 2 & 3 \end{pmatrix} \quad$ is a $2 \times 2$ matrix
(c) $\quad \begin{pmatrix} 2 & 0 & 4 & 6 \\ 1 & 5 & 3 & 9 \\ 0 & 4 & 1 & 8 \end{pmatrix} \quad$ is a $3 \times 4$ matrix
(d) $\quad \begin{pmatrix} 3 & 2 & 5 \end{pmatrix} \quad$ is a $1 \times 3$ matrix
(e) $\quad \begin{pmatrix} 2 \\ 1 \\ 8 \end{pmatrix} \quad$ is a $3 \times 1$ matrix
Types of Matrix
1 &quad; Square Matrix
A square matrix is a matrix having the same number of rows and columns.
Examples of square matrices are:
$$
\begin{pmatrix} 1 & 2 \\ 0 & 3 \end{pmatrix} \quad \text{is a square matrix of order } 2 \times 2
$$
$$
\begin{pmatrix} 2 & -3 & 1 \\ 1 & 0 & -2 \\ 0 & 3 & 0 \end{pmatrix} \quad \text{is a square matrix of order } 3 \times 3
$$
2 &quad; Row Matrix
A row matrix is a matrix having only one row.
Examples of row matrices are:
$\qquad \begin{pmatrix} 1 & 2 \end{pmatrix} \qquad\qquad\;\;$ is a row matrix of order $1 \times 2$
$\qquad \begin{pmatrix} 3 & 0 & 4 \end{pmatrix} \qquad\quad\;\;$ is a row matrix of order $1 \times 3$
$\qquad \begin{pmatrix} 0 & 2 & -5 & 3 \end{pmatrix} \quad$ is a row matrix of order $1 \times 4$
3 &quad; Column Matrix
A column matrix is a matrix having only one column.
Examples of column matrices are:
$$
\begin{pmatrix} 3 \\ 4 \end{pmatrix} \quad \text{is a column matrix of order } 2 \times 1
$$
$$
\begin{pmatrix} 1 \\ 0 \\ 5 \end{pmatrix} \quad \text{is a column matrix of order } 3 \times 1
$$
$$
\begin{pmatrix} 2 \\ -3 \\ 1 \\ -4 \end{pmatrix} \quad \text{is a column matrix of order } 4 \times 1
$$
4 &quad; Null Matrix
A null matrix is a matrix in which all its elements are zero.
Examples of null matrices are:
$$
\begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}, \quad
\begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}, \quad
\begin{pmatrix} 0 \\ 0 \end{pmatrix}, \quad
\begin{pmatrix} 0 & 0 & 0 \end{pmatrix}
$$
*(Keterangan bawah matriks: null matrix of order $2 \times 2$; null matrix of order $3 \times 3$; null matrix of order $2 \times 1$; null matrix of order $1 \times 3$.)*
5 &quad; Diagonal Matrix
A diagonal matrix is a square matrix in which all the elements are zero except all the elements on the major diagonal (or diagonal).
Examples of diagonal matrices are:
$$
\begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix} \quad (\text{major diagonal}), \qquad
\begin{pmatrix} 0 & 0 \\ 0 & 5 \end{pmatrix} \quad (\text{major diagonal})
$$
$$
\begin{pmatrix} -3 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{pmatrix} \quad (\text{major diagonal}), \qquad
\begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 4 \end{pmatrix} \quad (\text{major diagonal})
$$
6 &quad; Identity Matrix
An identity matrix is a diagonal matrix in which all the elements on the major diagonal are $1$, and it is usually denoted by the symbol $I$.
Hence, $\quad I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \quad \text{or} \quad \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} \quad \text{etc}$
*(Margin note: Identity matrix must be square.)*
7 &quad; Symmetric Matrix
A symmetric matrix is a square matrix in which the major diagonal is the axis of symmetry.
Examples of symmetric matrices are:
$$
\begin{pmatrix} 1 & 3 \\ 3 & 2 \end{pmatrix}
$$
*(Margin note: The major diagonal is the axis of symmetry. The element $3$ is reflected about the axis of symmetry.)*
$$
\begin{pmatrix} 2 & 1 & -3 \\ 1 & 0 & 0 \\ -3 & 0 & 4 \end{pmatrix}
$$
*(Margin note: The major diagonal is the axis of symmetry. The elements, $0, -3, 1$ are reflected about the axis of symmetry.)*
In each of the following square matrices, find the values of $a, b$ and $c$ so that the square matrices are symmetric matrices.
(a) $\quad \begin{pmatrix} 2 & 3 \\ a & 4 \end{pmatrix}$ *(axis of symmetry)*
(b) $\quad \begin{pmatrix} -3 & 2 & 4 \\ a - 1 & 0 & 2b - c \\ a + b & b & 1 \end{pmatrix}$ *(axis of symmetry)*
(a) For it to be symmetric about the major diagonal (axis of symmetry)
$\quad \therefore a = 3$
(b) Similarly, $$ \begin{aligned} a - 1 = 2 &\quad \Rightarrow \quad a = 3 \\ \text{and } a + b = 4 &\quad \Rightarrow \quad b = 4 - a = 4 - 3 = 1 \\ \text{also } b = 2b - c &\quad \Rightarrow \quad c = b \quad \Rightarrow \quad c = 1 \end{aligned} $$ Hence, $\quad a = 3,\; b = 1,\; c = 1$
We shall use capital letters $A, B, C$ etc to denote matrices, that is, we write $$ A = \begin{pmatrix} a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \dots & a_{mn} \end{pmatrix} $$ which means $A$ represents the above matrix. Note that $a_{ij}$ is used to denote the element appearing in the $i^{\text{th}}$ row and the $j^{\text{th}}$ column of the matrix. For example, $a_{34}$ is the element in the third row and fourth column. Matrix $A$ is sometimes abbreviated to $(a_{ij})$ where $1 \le i \le m$ and $1 \le j \le n$.
Equality of Matrices
Two matrices $A = (a_{ij})$, where $1 \le i \le m$ and $1 \le j \le n$ and $B = (b_{ij})$ where $1 \le i \le p$ and $1 \le j \le q$, are said to be equal, that is, $A = B$ if
(i) $\quad A$ and $B$ have the same order,
$\qquad$ i.e., $m = p$ and $n = q$.
(ii) $\quad$ the corresponding elements in $A$ and $B$ are equal, i.e, $a_{ij} = b_{ij}$ for all $i$ and $j$.
For example:
$$
\begin{pmatrix} 1 & 2 \\ 0.5 & -3 \end{pmatrix} = \begin{pmatrix} 1 & \dfrac{4}{2} \\[6pt] \dfrac{1}{2} & -3 \end{pmatrix} \quad \text{is true}
$$
and $\quad \begin{pmatrix} 1 & 4 & 0.2 \end{pmatrix} = \begin{pmatrix} 1 & 4 & \dfrac{1}{5} \end{pmatrix} \quad$ is true
but $\quad \begin{pmatrix} 2 \\ 1 \end{pmatrix} \ne \begin{pmatrix} 2 & -1 \\ 1 & 4 \end{pmatrix} \quad$ because they do not have the same number of columns.
and $\quad \begin{pmatrix} 1 & 0 & 3 \\ 4 & 2 & 5 \end{pmatrix} \ne \begin{pmatrix} 1 & 0 & 3 \\ 4 & -2 & 5 \end{pmatrix}$
*(Margin note: These elements are not equal — pada baris ke-2 kolom ke-2, $2 \ne -2$.)*
Find the values of all the unknown for which the given equations are true.
(a) $\quad \begin{pmatrix} 1 & 3 \end{pmatrix} = \begin{pmatrix} a & b \end{pmatrix}$
(b) $\quad \begin{pmatrix} 2 & a \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} b & 4 \\ c & -1 \end{pmatrix}$
(c) $\quad \begin{pmatrix} 3x - y & 2 \\ 0 & 3y - x \end{pmatrix} = \begin{pmatrix} 7 & 2 \\ 0 & 11 \end{pmatrix}$
(d) $\quad \begin{pmatrix} 2 - x & 3 & 4 \\ 4 & 2y & 2 \end{pmatrix} = \begin{pmatrix} 6 & 3 - z & 4 \\ 3 - 4w & -8 & 2 \end{pmatrix}$
(a) $\quad a = 1,\; b = 3$
(b) $\quad a = 4,\; b = 2,\; c = 0$
(c) $\quad 3x - y = 7 \Rightarrow y = 3x - 7 \quad \dots\dots \text{①}$
$\qquad 3y - x = 11 \quad \dots\dots \text{②}$
$\quad$ Substituting $\text{①}$ into $\text{②}$, we have
$$
\begin{aligned}
3(3x - 7) - x &= 11 \\
\therefore x = 4 \quad \text{and} \quad y &= 5.
\end{aligned}
$$
(d) $\quad 2 - x = 6 \quad \Rightarrow \quad x = -4$
$\qquad 2y = -8 \quad \Rightarrow \quad y = -4$
$\qquad 3 - z = 3 \quad \Rightarrow \quad z = 0$
$\qquad 2 - 4w = 4 \quad \Rightarrow \quad w = -\dfrac{1}{2}$
Addition and Subtraction of Matrices
The addition or subtraction of matrices is defined only for matrices having the same order.
If $A = (a_{ij})$ and $B = (b_{ij})$ are two $m \times n$ matrices, then $A + B = (a_{ij} + b_{ij})$ and $A - B = (a_{ij} - b_{ij})$ which are also matrices of order $m \times n$.
Note that the addition of matrices is
$\qquad$ Commutative : $\; A + B = B + A \qquad\qquad\quad\;\; \text{where } A, B, C \text{ are matrices}$
$\qquad$ Associative : $\; (A + B) + C = A + (B + C) \quad \text{of the same order}$
For examples,
(a) $\quad \begin{pmatrix} a & c \\ b & d \end{pmatrix} + \begin{pmatrix} x & z \\ y & w \end{pmatrix} = \begin{pmatrix} a + x & c + z \\ b + y & d + w \end{pmatrix}$
$\quad$ Order: $\quad 2 \times 2 \qquad\;\; 2 \times 2 \qquad\qquad\quad 2 \times 2$
(b) $\quad \begin{pmatrix} 2 & 3 \end{pmatrix} + \begin{pmatrix} 1 & 7 \end{pmatrix} = \begin{pmatrix} 2 + 1 & 3 + 7 \end{pmatrix} = \begin{pmatrix} 3 & 10 \end{pmatrix}$
(c) $\quad \begin{pmatrix} 0 & -1 \\ 2 & 3 \end{pmatrix} + \begin{pmatrix} 3 & 4 \\ -2 & 2 \end{pmatrix} = \begin{pmatrix} 0 + 3 & -1 + 4 \\ 2 - 2 & 3 + 2 \end{pmatrix} = \begin{pmatrix} 3 & 3 \\ 0 & 5 \end{pmatrix}$
(d) $\quad \begin{pmatrix} 6 & 4 \\ 2 & 0 \end{pmatrix} - \begin{pmatrix} 3 & 0 \\ -4 & 5 \end{pmatrix} = \begin{pmatrix} 6 - 3 & 4 - 0 \\ 2 - (-4) & 0 - 5 \end{pmatrix} = \begin{pmatrix} 3 & 4 \\ 6 & -5 \end{pmatrix}$
(e) $\quad \begin{pmatrix} 2 & 5 & 0 \\ 3 & 0 & 4 \\ 1 & 1 & 2 \end{pmatrix} + \begin{pmatrix} 0 & -1 & 5 \\ 2 & 7 & 0 \\ -1 & 0 & 3 \end{pmatrix} = \begin{pmatrix} 2 + 0 & 5 - 1 & 0 + 5 \\ 3 + 2 & 0 + 7 & 4 + 0 \\ 1 - 1 & 1 + 0 & 2 + 3 \end{pmatrix} = \begin{pmatrix} 2 & 4 & 5 \\ 5 & 7 & 4 \\ 0 & 1 & 5 \end{pmatrix}$
Similarly, if $A = (a_{ij})$, $B = (b_{ij})$ and $C = (c_{ij})$ are matrices of the same order, then $$A \pm B \pm C = (a_{ij} \pm b_{ij} \pm c_{ij})$$
For examples, $$ \begin{aligned} \begin{pmatrix} 2 & 4 \\ 3 & 7 \end{pmatrix} - \begin{pmatrix} 5 & 1 \\ 0 & -2 \end{pmatrix} + \begin{pmatrix} 0 & -2 \\ -1 & 3 \end{pmatrix} &= \begin{pmatrix} 2 - 5 + 0 & 4 - 1 + (-2) \\ 3 - 0 - 1 & 7 - (-2) + 3 \end{pmatrix} \\ &= \begin{pmatrix} -3 & 1 \\ 2 & 12 \end{pmatrix} \end{aligned} $$
Find the values of $a, b, c$ and $d$ for the following equation. $$\begin{pmatrix} 2a & 1 \\ -c & 4 \end{pmatrix} + \begin{pmatrix} 8 & b \\ 2 & d \end{pmatrix} = \begin{pmatrix} 3 & -2 \\ 5 & 6 \end{pmatrix}$$ *(Margin note: Do the addition of two matrices then followed by using the equality of two matrices.)*
Since there are $4$ unknowns, we should be able to form $4$ equations.
On the left-hand side, add the two matrices
$$\begin{pmatrix} 2a + 8 & 1 + b \\ 2 - c & 4 + d \end{pmatrix} = \begin{pmatrix} 3 & -2 \\ 5 & 6 \end{pmatrix}$$
By the equality of two matrices, we have
$$
\begin{aligned}
2a + 8 = 3 &\quad \Rightarrow \quad a = -\frac{5}{2} \\[6pt]
1 + b = -2 &\quad \Rightarrow \quad b = -3 \\
2 - c = 5 &\quad \Rightarrow \quad c = -3 \\
4 + d = 6 &\quad \Rightarrow \quad d = 2
\end{aligned}
$$
Hence, $\quad a = -\dfrac{5}{2},\; b = -3,\; c = -3 \text{ and } d = 2$
Multiplication of a Matrix by a Scalar
If $k$ is a scalar and $A$ is a matrix, then the product of $k$ and $A$ is denoted by $kA$ or $Ak$ which can be obtained by multiplying every element of $A$ by $k$.
If $A = (a_{ij})$
then $\quad kA = k(a_{ij}) = (ka_{ij})$
Note that $\quad kA = Ak \quad (\text{since } ka_{ij} = a_{ij}k)$ *(Margin note: Multiply every element of a matrix is multiplied by the scalar.)*
For example,
(a) $\quad k\begin{pmatrix} a & b \\ c & d \end{pmatrix} = \begin{pmatrix} ka & kb \\ kc & kd \end{pmatrix}$
(b) $\quad 3\begin{pmatrix} 6 & -1 \\ 0 & 2 \end{pmatrix} = \begin{pmatrix} 3(6) & 3(-1) \\ 3(0) & 3(2) \end{pmatrix}$ $$= \begin{pmatrix} 18 & -3 \\ 0 & 6 \end{pmatrix}$$
(c) $\quad \dfrac{1}{2}\begin{pmatrix} 2 & 0 & 3 \\ 4 & -1 & -5 \end{pmatrix} = \begin{pmatrix} \dfrac{1}{2}(2) & \dfrac{1}{2}(0) & \dfrac{1}{2}(3) \\[8pt] \dfrac{1}{2}(4) & \dfrac{1}{2}(-1) & \dfrac{1}{2}(-5) \end{pmatrix}$ $$= \begin{pmatrix} 1 & 0 & \dfrac{3}{2} \\[8pt] 2 & -\dfrac{1}{2} & -\dfrac{5}{2} \end{pmatrix}$$
Given that $\quad A = \begin{pmatrix} 2 & 5 & 7 \\ 8 & 1 & 4 \end{pmatrix}$, $\; B = \begin{pmatrix} -2 & 0 & 4 \\ 10 & 6 & 3 \end{pmatrix} \;$ and $\; C = \begin{pmatrix} 1 & 6 & 5 \\ 0 & -2 & 9 \end{pmatrix}$.
Find $\; 3A + 2B - 4C$.
*(Margin note: Multiply each element with the scalar first, then add and subtract the matrices.)*
$$ \begin{aligned} 3A + 2B - 4C &= 3\begin{pmatrix} 2 & 5 & 7 \\ 8 & 1 & 4 \end{pmatrix} + 2\begin{pmatrix} -2 & 0 & 4 \\ 10 & 6 & 3 \end{pmatrix} - 4\begin{pmatrix} 1 & 6 & 5 \\ 0 & -2 & 9 \end{pmatrix} \\ &= \begin{pmatrix} 6 & 15 & 21 \\ 24 & 3 & 12 \end{pmatrix} + \begin{pmatrix} -4 & 0 & 8 \\ 20 & 12 & 6 \end{pmatrix} - \begin{pmatrix} 4 & 24 & 20 \\ 0 & -8 & 36 \end{pmatrix} \\ &= \begin{pmatrix} 6 - 4 - 4 & 15 + 0 - 24 & 21 + 8 - 20 \\ 24 + 20 - 0 & 3 + 12 + 8 & 12 + 6 - 36 \end{pmatrix} \\ &= \begin{pmatrix} -2 & -9 & 9 \\ 44 & 23 & -18 \end{pmatrix} \end{aligned} $$ *(Catatan ketikan: pada gambar halaman 167, perkalian $3 \times 7$ di baris 1 kolom 3 tertulis $27$ sehingga hasil akhirnya tertulis $15$, sedangkan secara hitung $3 \times 7 + 2 \times 4 - 4 \times 5 = 21 + 8 - 20 = 9$.)*
Find the values of $x, y, z, u$ and $v$ in the following matrix equation. $$-3\begin{pmatrix} x & -3 \\ 1 & y \\ 2 & 4 \end{pmatrix} + 2\begin{pmatrix} 2 & y \\ 0 & 3 \\ 4 & z \end{pmatrix} = \begin{pmatrix} 6 & 7 \\ u & 9 \\ v & 0 \end{pmatrix}$$
Since there are $6$ unknowns *(pada soal: $5$ unknowns)*, we should be able to form $6$ equations.
Left-hand side: Multiplication of a scalar with a matrix then followed by addition of two matrices.
$$
\begin{aligned}
\begin{pmatrix} -3x & 9 \\ -3 & -3y \\ -6 & -12 \end{pmatrix} + \begin{pmatrix} 4 & 2y \\ 0 & 6 \\ 8 & 2z \end{pmatrix} &= \begin{pmatrix} 6 & 7 \\ u & 9 \\ v & 0 \end{pmatrix} \\
\begin{pmatrix} -3x + 4 & 9 + 2y \\ -3 + 0 & -3y + 6 \\ -6 + 8 & -12 + 2z \end{pmatrix} &= \begin{pmatrix} 6 & 7 \\ u & 9 \\ v & 0 \end{pmatrix}
\end{aligned}
$$
By the equality of two matrices, we have
$$
\begin{aligned}
-3x + 4 = 6 &\quad \Rightarrow \quad x = -\frac{2}{3} \\[6pt]
-3y + 6 = 9 &\quad \Rightarrow \quad y = -1 \\
-12 + 2z = 0 &\quad \Rightarrow \quad z = 6 \\
u &= -3 \\
v = -6 + 8 &= 2 \\
\therefore x = -\frac{2}{3},\; y = -1,\; z = 6,\; u = -3 &\quad \text{and} \quad v = 2.
\end{aligned}
$$
Given the matrix equation $\; 2A - 3\begin{pmatrix} 1 & 2 \\ -4 & 0 \end{pmatrix} = \begin{pmatrix} 3 & 2 \\ 1 & -2 \end{pmatrix}$.
Find the matrix $A$
*(Margin note: Matrix $A$ must be of the order $2 \times 2$ for the addition of matrices to be defined.)*
For the above equation to be possible, the matrix $A$ must be of the order $2 \times 2$
$\qquad\qquad \text{Let } A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$
$$
\begin{aligned}
2\begin{pmatrix} a & b \\ c & d \end{pmatrix} - 3\begin{pmatrix} 1 & 2 \\ -4 & 0 \end{pmatrix} &= \begin{pmatrix} 3 & 2 \\ 1 & -2 \end{pmatrix} \\
\begin{pmatrix} 2a & 2b \\ 2c & 2d \end{pmatrix} - \begin{pmatrix} 3 & 6 \\ -12 & 0 \end{pmatrix} &= \begin{pmatrix} 3 & 2 \\ 1 & -2 \end{pmatrix} \\
\begin{pmatrix} 2a - 3 & 2b - 6 \\ 2c + 12 & 2d - 0 \end{pmatrix} &= \begin{pmatrix} 3 & 2 \\ 1 & -2 \end{pmatrix}
\end{aligned}
$$
$$
\begin{aligned}
2a - 3 = 3 &\quad \Rightarrow \quad a = 3 \\
2b - 6 = 2 &\quad \Rightarrow \quad b = 4 \\
2c + 12 = 1 &\quad \Rightarrow \quad c = -\frac{11}{2} \\[6pt]
2d = -2 &\quad \Rightarrow \quad d = -1
\end{aligned}
$$
Hence, $\quad a = 3,\; b = 4,\; c = -\dfrac{11}{2},\;$ and $\; d = -1$
$$\therefore A = \begin{pmatrix} 3 & 4 \\ -\dfrac{11}{2} & -1 \end{pmatrix}$$
*(Margin note: Alternative method — $2A = \begin{pmatrix} 3 & 2 \\ 1 & -2 \end{pmatrix} + \begin{pmatrix} 3 & 6 \\ -12 & 0 \end{pmatrix} = \begin{pmatrix} 6 & 8 \\ -11 & -2 \end{pmatrix} \Rightarrow A = \begin{pmatrix} 3 & 4 \\ -\dfrac{11}{2} & -1 \end{pmatrix}$.)*
Multiplication of Matrices
1 &quad; Product of a row matrix and a column matrix
The product of a $1 \times n$ row matrix and an $n \times 1$ column matrix is a $1 \times 1$ matrix given by
$$
\begin{pmatrix} a_1 & a_2 & \dots & a_n \end{pmatrix}
\begin{pmatrix} b_1 \\ b_2 \\ \vdots \\ b_n \end{pmatrix}
= \begin{pmatrix} a_1b_1 + a_2b_2 + \dots + a_nb_n \end{pmatrix}
$$
*(Order: $1 \times n$ dikali $n \times 1$ menghasilkan $1 \times 1$.)*
For example, $$ \begin{aligned} \begin{pmatrix} 2 & -3 & 4 \end{pmatrix} \begin{pmatrix} 1 \\ 0 \\ 5 \end{pmatrix} &= \begin{pmatrix} 2 \times 1 + (-3)(0) + 4(5) \end{pmatrix} \\ &= \begin{pmatrix} 22 \end{pmatrix} \end{aligned} $$ *(Order: $1 \times 3$ dikali $3 \times 1$ menghasilkan $1 \times 1$.)*
2 &quad; Product of general matrices
The product of a matrix $A$ of order $2 \times n$ and a matrix $B$ of order $n \times 1$ is a matrix of order $2 \times 1$.
Let $\quad A = \begin{pmatrix} a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \end{pmatrix}$, $\quad B = \begin{pmatrix} b_1 \\ b_2 \\ \vdots \\ b_n \end{pmatrix}$
We have $$ AB = \begin{pmatrix} a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \end{pmatrix} \begin{pmatrix} b_1 \\ b_2 \\ \vdots \\ b_n \end{pmatrix} = \begin{pmatrix} a_{11}b_1 + a_{12}b_2 + \dots + a_{1n}b_n \\ a_{21}b_1 + a_{22}b_2 + \dots + a_{2n}b_n \end{pmatrix} $$ *(Order: $2 \times n$ dikali $n \times 1$ menghasilkan $2 \times 1$.)*
Generally, if $A$ and $B$ are two matrices such that the number of columns in $A$ is equal to the number of rows in $B$, then the product of the two matrices $A$ and $B$, denoted by $AB$, is a matrix whose element in the $i^{\text{th}}$ row and $j^{\text{th}}$ column is the sum of the products formed by multiplying each element in the $i^{\text{th}}$ row of $A$ by the corresponding element in the $j^{\text{th}}$ column of $B$. $$ \begin{array}{ccc} A & B & AB \\ \begin{pmatrix} a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & & \vdots \\ a_{m1} & a_{m2} & \dots & a_{mn} \end{pmatrix} & \begin{pmatrix} b_{11} & b_{12} & \dots & b_{1t} \\ b_{21} & b_{22} & \dots & b_{2t} \\ \vdots & \vdots & & \vdots \\ b_{n1} & b_{n2} & \dots & b_{nt} \end{pmatrix} & = \begin{pmatrix} r_1c_1 & r_1c_2 & \dots & r_1c_t \\ r_2c_1 & r_2c_2 & \dots & r_2c_t \\ \vdots & \vdots & & \vdots \\ r_mc_1 & r_mc_2 & \dots & r_mc_t \end{pmatrix} \\ m \times n & n \times t & m \times t \end{array} $$
where
$r_1 = \text{first row} \qquad\qquad c_1 = \text{first column}$
$r_2 = \text{second row} \qquad\quad\; c_2 = \text{second column}$
$\vdots \qquad\qquad\qquad\qquad\qquad \vdots$
$r_m = m^{\text{th}}\text{ row} \qquad\qquad c_t = t^{\text{th}}\text{ column}$
$$ \begin{aligned} r_1c_1 &= a_{11}b_{11} + a_{12}b_{21} + \dots + a_{1n}b_{n1} \\ r_2c_1 &= a_{21}b_{11} + a_{22}b_{21} + \dots + a_{2n}b_{n1} \\ &\vdots \\ r_mc_t &= a_{m1}b_{1t} + a_{m2}b_{2t} + \dots + a_{mn}b_{nt} \end{aligned} $$ The element in the $i^{\text{th}}$ row and $j^{\text{th}}$ column is $$r_ic_j = a_{i1}b_{1j} + a_{i2}b_{2j} + \dots + a_{in}b_{nj}$$ where $i = 1, 2, \dots, m$ and $j = 1, 2, \dots, t$
Note that
(i) if matrix $A$ is of order $m \times n$ and matrix $B$ is of order $n \times t$, then matrix $AB$ is of order $m \times t$
(ii) matrix multiplication is possible only when the number of columns in the first matrix is equal to the number of rows in the second matrix.
Compute the products of $AB$ and $BA$
where $\quad A = \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix} \quad \text{and} \quad B = \begin{pmatrix} 1 & 2 & -3 \\ 0 & 4 & 2 \end{pmatrix}$
Since $A$ is a $2 \times 2$ matrix and $B$ is a $2 \times 3$ matrix, then $AB$ is defined and its order is $2 \times 3$. $$ \begin{aligned} AB &= \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix} \begin{pmatrix} 1 & 2 & -3 \\ 0 & 4 & 2 \end{pmatrix} \\ &= \begin{pmatrix} (2)(1) + (3)(0) & (2)(2) + (3)(4) & 2(-3) + (3)(2) \\ (1)(1) + (4)(0) & (1)(2) + (4)(4) & (1)(-3) + (4)(2) \end{pmatrix} \\ &= \begin{pmatrix} 2 & 16 & 0 \\ 1 & 18 & 5 \end{pmatrix} \end{aligned} $$ *(Order: $2 \times 2$ dikali $2 \times 3$ menghasilkan $2 \times 3$.)* For $BA$, since $B$ has three columns and $A$ has only two rows, i.e., the number of columns in $B$ is not equal to the number of rows in $A$, hence $BA$ is not defined.
If $A = \begin{pmatrix} 1 & 2 \\ 2 & 3 \end{pmatrix}$, $B = \begin{pmatrix} 3 & 1 \\ 0 & 4 \end{pmatrix}$, compute $AB$ and $BA$. Is $AB = BA$?
$$
\begin{aligned}
AB &= \begin{pmatrix} 1 & 2 \\ 2 & 3 \end{pmatrix} \begin{pmatrix} 3 & 1 \\ 0 & 4 \end{pmatrix} \\
&= \begin{pmatrix} (1)(3) + (2)(0) & (1)(1) + (2)(4) \\ (2)(3) + (3)(0) & (2)(1) + (3)(4) \end{pmatrix} \\
&= \begin{pmatrix} 3 & 9 \\ 6 & 14 \end{pmatrix}
\end{aligned}
$$
$$
\begin{aligned}
BA &= \begin{pmatrix} 3 & 1 \\ 0 & 4 \end{pmatrix} \begin{pmatrix} 1 & 2 \\ 2 & 3 \end{pmatrix} \\
&= \begin{pmatrix} (3)(1) + (1)(2) & (3)(2) + (1)(3) \\ (0)(1) + (4)(2) & (0)(2) + (4)(3) \end{pmatrix} \\
&= \begin{pmatrix} 5 & 9 \\ 8 & 12 \end{pmatrix}
\end{aligned}
$$
Hence, $AB \ne BA$.
This example illustrates that
$$AB \ne BA$$
If $A = \begin{pmatrix} 1 & 3 \\ 2 & -1 \end{pmatrix}$, $B = \begin{pmatrix} 2 & 3 \\ 4 & 0 \end{pmatrix}$ and $C = \begin{pmatrix} -4 & 0 \\ 2 & 5 \end{pmatrix}$, find $(AB)C$ and $A(BC)$.
Is $(AB)C = A(BC)$?
$$
\begin{aligned}
(AB)C &= \left[\begin{pmatrix} 1 & 3 \\ 2 & -1 \end{pmatrix} \begin{pmatrix} 2 & 3 \\ 4 & 0 \end{pmatrix}\right] \begin{pmatrix} -4 & 0 \\ 2 & 5 \end{pmatrix} \\
&= \begin{pmatrix} 14 & 3 \\ 0 & 6 \end{pmatrix} \begin{pmatrix} -4 & 0 \\ 2 & 5 \end{pmatrix} \\
&= \begin{pmatrix} -50 & 15 \\ 12 & 30 \end{pmatrix}
\end{aligned}
$$
$$
\begin{aligned}
A(BC) &= \begin{pmatrix} 1 & 3 \\ 2 & -1 \end{pmatrix} \left[\begin{pmatrix} 2 & 3 \\ 4 & 0 \end{pmatrix} \begin{pmatrix} -4 & 0 \\ 2 & 5 \end{pmatrix}\right] \\
&= \begin{pmatrix} 1 & 3 \\ 2 & -1 \end{pmatrix} \begin{pmatrix} -2 & 15 \\ -16 & 0 \end{pmatrix} \\
&= \begin{pmatrix} -50 & 15 \\ 12 & 30 \end{pmatrix}
\end{aligned}
$$
Hence, $(AB)C = A(BC)$
This example illustrates that
$$(AB)C = A(BC)$$
It can be shown that matrix multiplication is distributive over addition. Thus, for any matrices $A$, $B$ and $C$, we have
provided that the operations involved are defined.
If $A$ is a square matrix of order $n \times n$, we can write $A^2 = AA$
For example, if $A = \begin{pmatrix} 2 & 5 \\ 1 & -3 \end{pmatrix}$ then
$$
\begin{aligned}
A^2 &= AA \\
&= \begin{pmatrix} 2 & 5 \\ 1 & -3 \end{pmatrix} \begin{pmatrix} 2 & 5 \\ 1 & -3 \end{pmatrix} \\
&= \begin{pmatrix} 9 & -5 \\ -1 & 14 \end{pmatrix}
\end{aligned}
$$
$$
\begin{aligned}
A^2 A &= \begin{pmatrix} 9 & -5 \\ -1 & 14 \end{pmatrix} \begin{pmatrix} 2 & 5 \\ 1 & -3 \end{pmatrix} \\
&= \begin{pmatrix} 13 & 60 \\ 12 & -47 \end{pmatrix}
\end{aligned}
$$
$$
\begin{aligned}
A A^2 &= \begin{pmatrix} 2 & 5 \\ 1 & -3 \end{pmatrix} \begin{pmatrix} 9 & -5 \\ -1 & 14 \end{pmatrix} \\
&= \begin{pmatrix} 13 & 60 \\ 12 & -47 \end{pmatrix}
\end{aligned}
$$
Notice that $A^2 A = A A^2 = AAA$
Thus, $A^3 = AAA$.
$$A^n = \underbrace{AAA\dots A}_{n \text{ times}} \qquad \text{where } m, n \in \mathbb{N}$$ $$\text{(i)} \quad (A^m)(A^n) = A^{m+n} \qquad\qquad \text{(ii)} \quad (A^m)^n = A^{mn}$$
Characteristic of Identity Matrix, $I$
If $A$ is any square matrix of order $n \times n$ and $I$ is an identity matrix of the same order, then
For example, if $A = \begin{pmatrix} a_1 & a_2 \\ a_3 & a_4 \end{pmatrix}$ and $I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$, $$ \begin{aligned} AI &= \begin{pmatrix} a_1 & a_2 \\ a_3 & a_4 \end{pmatrix} \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \\ &= \begin{pmatrix} a_1 & a_2 \\ a_3 & a_4 \end{pmatrix} \\ &= A \end{aligned} $$ $$ \begin{aligned} IA &= \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \begin{pmatrix} a_1 & a_2 \\ a_3 & a_4 \end{pmatrix} \\ &= \begin{pmatrix} a_1 & a_2 \\ a_3 & a_4 \end{pmatrix} \\ &= A \end{aligned} $$ Hence, $IA = AI = A$.
If $B = \begin{pmatrix} b_1 & b_2 & b_3 \\ b_4 & b_5 & b_6 \end{pmatrix}$ and $I = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$. Find $BI$ and $IB$.
$$ \begin{aligned} BI &= \begin{pmatrix} b_1 & b_2 & b_3 \\ b_4 & b_5 & b_6 \end{pmatrix} \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} \\ &= \begin{pmatrix} b_1 & b_2 & b_3 \\ b_4 & b_5 & b_6 \end{pmatrix} \\ &= B \end{aligned} $$ The product of $IB$ is undefined since the number of columns in $I \ne$ the number of rows in $B$.
$$ \begin{aligned} A\,I_n &= A \qquad \text{where } I_n \text{ is the identity matrix of order } n \times n \\ I_m\,A &= A \qquad \text{where } I_m \text{ is the identity matrix of order } m \times m \end{aligned} $$
Given that $A = \begin{pmatrix} 2 & 0 \\ -1 & 3 \end{pmatrix}$ and $I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$.
Compute $A^2 - 3A + 2I$ and $(A - I)(A - 2I)$.
Is $A^2 - 3A + 2I = (A - I)(A - 2I)$?
$$ \begin{aligned} A^2 - 3A + 2I &= \begin{pmatrix} 2 & 0 \\ -1 & 3 \end{pmatrix} \begin{pmatrix} 2 & 0 \\ -1 & 3 \end{pmatrix} - 3\begin{pmatrix} 2 & 0 \\ -1 & 3 \end{pmatrix} + 2\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \\ &= \begin{pmatrix} 4 & 0 \\ -5 & 9 \end{pmatrix} - \begin{pmatrix} 6 & 0 \\ -3 & 9 \end{pmatrix} + \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix} \\ &= \begin{pmatrix} 0 & 0 \\ -2 & 2 \end{pmatrix} \end{aligned} $$ $$ \begin{aligned} (A - I)(A - 2I) &= \left[\begin{pmatrix} 2 & 0 \\ -1 & 3 \end{pmatrix} - \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\right]\left[\begin{pmatrix} 2 & 0 \\ -1 & 3 \end{pmatrix} - 2\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\right] \\ &= \begin{pmatrix} 1 & 0 \\ -1 & 2 \end{pmatrix}\left[\begin{pmatrix} 2 & 0 \\ -1 & 3 \end{pmatrix} - \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix}\right] \\ &= \begin{pmatrix} 1 & 0 \\ -1 & 2 \end{pmatrix} \begin{pmatrix} 0 & 0 \\ -1 & 1 \end{pmatrix} \\ &= \begin{pmatrix} 0 & 0 \\ -2 & 2 \end{pmatrix} \end{aligned} $$ Yes, $A^2 - 3A + 2I = (A - I)(A - 2I)$
If $P = \begin{pmatrix} -3 & 2 \\ -2 & 2 \end{pmatrix}$, $I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$ and $O = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}$, find the number $\alpha$ such that $P^2 + P + \alpha I = O$. Deduce that $P^3 = 3P - 2I$ and find $P^3$. *(Margin note: In this question, the word ‘deduce’ means ‘in terms of’.)*
$$
\begin{aligned}
P^2 + P + \alpha I &= O \\
\begin{pmatrix} -3 & 2 \\ -2 & 2 \end{pmatrix} \begin{pmatrix} -3 & 2 \\ -2 & 2 \end{pmatrix} + \begin{pmatrix} -3 & 2 \\ -2 & 2 \end{pmatrix} + \alpha \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} &= \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix} \\
\begin{pmatrix} 5 & -2 \\ 2 & 0 \end{pmatrix} + \begin{pmatrix} -3 & 2 \\ -2 & 2 \end{pmatrix} + \begin{pmatrix} \alpha & 0 \\ 0 & \alpha \end{pmatrix} &= \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix} \\
\begin{pmatrix} 2 + \alpha & 0 \\ 0 & 2 + \alpha \end{pmatrix} &= \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}
\end{aligned}
$$
$\therefore 2 + \alpha = 0 \Rightarrow \alpha = -2$.
Substituting $\alpha = -2$ into the matrix equation, we have
$$
\begin{aligned}
P^2 + P - 2I &= O \\
P^2 &= -P + 2I
\end{aligned}
$$
Multiply throughout by $P$, we have
$$
\begin{aligned}
P^3 &= P(-P + 2I) \quad &&\leftarrow \text{Matrix multiplication} \\
&= -P^2 + 2PI \quad &&\leftarrow \text{Distributive law} \\
&= -(-P + 2I) + 2P \quad &&\leftarrow \text{Substituting } P^2 = -P + 2I \\
&= P - 2I + 2P \\
&= 3P - 2I
\end{aligned}
$$
$$
\begin{aligned}
\therefore P^3 &= 3\begin{pmatrix} -3 & 2 \\ -2 & 2 \end{pmatrix} - 2\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \\
&= \begin{pmatrix} -9 & 6 \\ -6 & 6 \end{pmatrix} - \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix} \\
&= \begin{pmatrix} -11 & 6 \\ -6 & 4 \end{pmatrix}
\end{aligned}
$$
Some Properties of Matrix Operations
Let $A, B$ and $C$ be the $m \times n$ matrices, $D$ and $E$ be the $n \times p$ matrices, $F$ be a $p \times q$ matrix and $\alpha, \beta$ are any real numbers.
- $A + B = B + A$
- $A + (B + C) = (A + B) + C$
- $\alpha(A + B) = \alpha A + \alpha B$
- $(\alpha + \beta)A = \alpha A + \beta A$
- $(\alpha \beta)A = \alpha(\beta A)$
- $A(D + E) = AD + AE$
- $(B + C)E = BE + CE$
- $A(DF) = (AD)F$
- $\alpha(AD) = (\alpha A)D = A(\alpha D)$
Applications of Matrices in Real Life
Discover how matrices are used in everyday life, business, computer technology, engineering, and transportation systems.
Matrices are not only mathematical arrangements of numbers. They are also powerful tools for organizing information, solving complex problems, and representing relationships between different quantities. In many fields, matrices help people process data, perform calculations, and make important decisions more efficiently.
1. Business and Financial Management
Matrices are widely used in business and finance to organize financial information, calculate expenses, compare sales, and analyze company performance.
For example, a company may use a matrix to record the number of products sold by different branches over several months. This makes it easier to compare sales and calculate total revenue.
2. Computer Graphics and Digital Images
Matrices play an important role in computer graphics, image processing, animation, and digital design. A digital image can be represented as a matrix of pixels, where each element contains information about color and brightness.
Matrices are also used to transform objects on a computer screen. Operations such as rotation, reflection, scaling, and translation can be represented mathematically using matrices.
3. Engineering and Technology
Engineers use matrices to solve systems of equations involving many unknown variables. These calculations are important in structural analysis, electrical engineering, mechanical systems, and scientific simulations.
For example, engineers can use matrices to analyze forces acting on a structure, calculate electrical currents in circuits, and model the behavior of mechanical systems.
4. Transportation and Traffic Systems
Matrices can be used to represent connections between locations and analyze transportation networks. They help organize information about routes, distances, traffic movements, and travel patterns.
In traffic analysis, matrices can represent the number of vehicles moving between different areas. This information helps transportation planners understand traffic patterns and improve road systems.
Conclusion
Matrices are essential mathematical tools with many practical applications in modern life. They help organize data, simplify complicated calculations, and solve problems involving several variables.
From financial management and computer graphics to engineering and transportation systems, matrices make it possible to represent and analyze complex information in a systematic way.
Understanding matrices is therefore not only important for learning mathematics but also for understanding how mathematics supports science, technology, business, and everyday activities.
Frequently Asked Questions (FAQ) About Matrices
Find clear answers to common questions about matrices, their types, properties, operations, and real-life applications.
1. What is a matrix in mathematics?
A matrix is a rectangular arrangement of numbers, symbols, or expressions organized into rows and columns. Each individual entry is called an element or entry of the matrix.
Matrices are used to organize data, perform calculations, and solve systems of linear equations.
2. What is the order or dimension of a matrix?
The order of a matrix refers to the number of rows and columns it contains. It is written as m × n, where m represents the number of rows and n represents the number of columns.
For example, a matrix with 3 rows and 2 columns has an order of 3 × 2.
3. What are the different types of matrices?
There are several types of matrices based on their structure and properties. Common examples include:
- Row matrix: A matrix with only one row.
- Column matrix: A matrix with only one column.
- Square matrix: A matrix with the same number of rows and columns.
- Zero matrix: A matrix in which every element is zero.
- Diagonal matrix: A square matrix whose off-diagonal elements are zero.
- Identity matrix: A diagonal matrix with all diagonal elements equal to one.
- Symmetric matrix: A square matrix equal to its transpose.
4. When can two matrices be considered equal?
Two matrices are equal if they have the same order and all corresponding elements are equal.
For example, two matrices of order 2 × 2 are equal only when their corresponding entries in the first row and second row are exactly the same.
5. How do you add or subtract matrices?
Two matrices can be added or subtracted only if they have the same order.
The operation is performed by adding or subtracting corresponding elements in the same positions.
For example, the element in the first row and first column of one matrix is added to or subtracted from the element in the same position of the other matrix.
6. How does matrix multiplication work?
Matrix multiplication is performed by multiplying the elements of a row in the first matrix by the corresponding elements of a column in the second matrix, then adding the products.
Matrix multiplication is possible when the number of columns in the first matrix is equal to the number of rows in the second matrix.
If matrix A has order m × n and matrix B has order n × p, their product AB has order m × p.
7. Is matrix multiplication commutative?
No. In general, matrix multiplication is not commutative.
This means that AB is generally not equal to BA. In some cases, one product may exist while the other product is not defined because the matrix dimensions do not satisfy the multiplication condition.
Therefore, the order of matrices is important when performing matrix multiplication.
8. What are the real-life applications of matrices?
Matrices have many practical applications in science, technology, business, and everyday life.
Some important examples include:
- Business: Organizing sales data and financial information.
- Computer graphics: Processing images and transforming objects.
- Engineering: Solving systems of equations and analyzing structures.
- Transportation: Representing traffic patterns and transportation networks.
- Science: Modeling complex systems and analyzing experimental data.
These applications show that matrices are useful tools for solving real-world problems efficiently.