1.2. Arithmetic operations on matrices#
So far, we have given a fancy name to a rectangular array of objects and showed how we can index its elements. Now we are going to fully develop an algebra for matrices. A system, where there are operations of addition and multiplication and necessarily rules that accompany them. This system resembles that of real numbers but we will see some differences and new concepts. For simplicity, we are going to assume that the entries of our matrices are numbers, however the developed theory applies to a broader range of objects.
1.2.1. Matrix equality#
(Matrix equality)
We say that an \(m \times n\) matrix \(A\) and an \(p \times q\) matrix \(B\) are equal and write \(A = B\) if and only if both of the following conditions are satisfied:
they have the same dimensions, i.e., \(m = p\) and \(n = q\)
for all \(1 \leq i \leq m\) and \(1 \leq j \leq n\), \(a_{ij} = b_{ij}\)
For example, consider the following matrices
Here \(A \neq B\) since \(A\) has 2 columns and \(B\) has 3 columns. However, \(A=C\) because both \(A\) and \(C\) have the same number of rows and columns and all of the corresponding elements are equal.
1.2.2. Matrix addition#
(Matrix addition and subtraction)
Let \(A\) and \(B\) be two \(m \times n\) matrices. The addition or subtraction of two \(m \times n\) matrices \(A\) and \(B\) is an \(m \times n\) matrix \(A \pm B\) defined by:
where \(1 \leq i \leq m\) and \(1 \leq j \leq n\). For example, the addition or subtraction of two \(2 \times 2\) matrices is
The addition and subtraction of two matrices of different sizes is not defined.
(Properties of matrix addition)
For all \(m \times n\) matrices \(A,B\) and \(C\), the following conditions are satisfied:
matrix addition is commutative, i.e., \(A + B = B + A\);
matrix addition is associative, i.e., \(A + (B + C) = (A + B) + C\).
Evaluate the following:
(i) \(\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} + \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}\);
Solution
(ii) \(\begin{pmatrix} 2 \\ 3 \\ 5 \end{pmatrix} - \begin{pmatrix} 7 \\ -11 \\ -13 \end{pmatrix}\);
Solution
(iii) \(\begin{pmatrix} 1 & 3 & 5 \\ 7 & 9 & 11 \end{pmatrix} + \begin{pmatrix}2 & 3 \\ 5 & 7 \end{pmatrix}\).
Solution
Undefined since the left matrix is \(2\times 3\) and the right matrix is \(2\times 2\)
1.2.3. Scalar multiplication#
(Scalar multiplication)
Let \(A\) be a matrix and \(k \in \mathbb{R}\) be a scalar. The scalar multiplication \(kA\) is defined by
i.e.,
(Properties of scalar multiplication)
Let \(A\) and \(B\) be two \(m \times n\) matrices and \(k\) and \(\ell\) are scalars then
scalar multiplication is commutative: \(kA = Ak\)
scalar multiplication is distributive over matrix addition: \(k (A + B) = kA + kB\)
scalar multiplication is distributive over scalar addition: \((k + \ell)A = kA +\ell A\)
scalar multiplication is associative: \(k(\ell A) = (k \ell) A = \ell(kA)\)
multiplication by \(-1\) gives the additive inverse: \(-1 \times A = -A\)
Evaluate the following:
(i) \(2 \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\)
Solution
(ii) \(\dfrac{1}{2} \begin{pmatrix} 0 & -1 \\ 3 & 2 \\ 4 &-2 \end{pmatrix}\)
Solution
(iii) \(a \begin{pmatrix} 1 & 6 & 4 \\ 0 & 3 & -1 \end{pmatrix}\)
Solution
(iv) \(101 \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix} - 99 \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix}\)
Solution
1.2.4. Matrix transpose#
(Matrix transpose)
The transpose of an \(m \times n\) matrix \(A\) is a \(n \times m\) matrix denoted by \(A^\mathsf{T}\) formed by switching the rows and columns of \(A\), i.e.,
Transposing a matrix switches the rows and columns around so that row \(i\) becomes column \(i\) and column \(j\) becomes row \(j\), i.e.,
(Properties of matrix transpose)
Let \(A\) and \(B\) be two square \(n \times n\) matrices and \(k\) a scalar, then
\((A^\mathsf{T})^\mathsf{T} = A\)
\((A + B)^\mathsf{T} = A^\mathsf{T} + B^\mathsf{T}\)
\((k A)^\mathsf{T} = k (A^\mathsf{T})\)
\((AB)^\mathsf{T} = B^\mathsf{T}A^\mathsf{T}\) (the product of two matrices is defined in the following section)
Evaluate the following:
(i) \(\begin{pmatrix} 1 & 3 \\ 2 & 4 \end{pmatrix}^\mathsf{T}\)
Solution
(ii) \(\begin{pmatrix} 1 & 0 & -2 \\ 3 & -4 & 1 \end{pmatrix}^\mathsf{T}\)
Solution
(iii) \(\begin{pmatrix}2 & 3 & 5 \end{pmatrix}^\mathsf{T}\)