Simple Operations with Matrices

(Addition, Subtraction & Multiplication by a Scalar)


In this section we learn about addition, subtraction, and multiplication by a scalar with matrices.

When adding and subtracting with matrices, the following important rule should always be kept in mind:


Only matrices that are of the same order can be added to, or subtracted from, each other.

So, for example, given the matrices \(A = \begin{pmatrix} 1 & -2 \\ 0 & 3\end{pmatrix}\), \(B = \begin{pmatrix} 4 & 1 \\ 2 & -5 \end{pmatrix}\) and \(C = \begin{pmatrix} 1 & -2 & 7\\ 0 & 3 & 5\end{pmatrix}\) we can calculate: \(A+B\), \(A-B\) and \(B-A\) but we cannot calculate \(A+C\), \(B-C\), ... since \(C\) is of order \(\begin{pmatrix} 2\times 3\end{pmatrix}\) and both \(A\) and \(B\) are of order \(2\times 2\).


Addition & Subtraction with Matrices


Given two matrices \(A\) and \(B\) of the same order, \(A = \begin{pmatrix}a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}\) and \(B = \begin{pmatrix} b_{11} & b_{12} \\ b_{21} & b_{22} \end{pmatrix} \), we can add them together by adding corresponding entries together. Similarly, to subtract \(B\) from \(A\) we subtract each entry of \(B\) from its corresponding entry in \(A\).

This is shown here for \(2 \times 2\) matrices. The method would be the same for any two matrices of the same order.

Addition

\[ A+B = \begin{pmatrix}a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix} + \begin{pmatrix} b_{11} & b_{12} \\ b_{21} & b_{22} \end{pmatrix} = \begin{pmatrix}a_{11} + b_{11}& a_{12} + b_{12} \\ a_{21} + b_{21} & a_{22} + b_{22} \end{pmatrix} \]

Subtraction

\[ A - B = \begin{pmatrix}a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix} - \begin{pmatrix} b_{11} & b_{12} \\ b_{21} & b_{22} \end{pmatrix} = \begin{pmatrix}a_{11} - b_{11}& a_{12} - b_{12} \\ a_{21} - b_{21} & a_{22} - b_{22} \end{pmatrix} \]


Example 1

Given the matrices \(A = \begin{pmatrix} 2 & 3 \\ 1 & -5 \end{pmatrix}\) and \(B = \begin{pmatrix} -2 & 0 \\ 7 & -1 \end{pmatrix}\), below we show how to calculate \(A+B\) as well as \(A - b\).

Addition

We find \(A+B\) as follows: \[\begin{aligned} A + B &= \begin{pmatrix} 2 & 3 \\ 1 & -5 \end{pmatrix} + \begin{pmatrix} -2 & 0 \\ 7 & -1 \end{pmatrix} \\ & = \begin{pmatrix} 2 + (-2) & 3 + 0 \\ 1 + 7 & -5 + (-1) \end{pmatrix}\\ A + B & = \begin{pmatrix} 0 & 3 \\ 8 & -6 \end{pmatrix} \end{aligned}\]


Subtraction

We find \(A-B\) as follows: \[\begin{aligned} A - B & = \begin{pmatrix} 2 & 3 \\ 1 & -5 \end{pmatrix} - \begin{pmatrix} -2 & 0 \\ 7 & -1 \end{pmatrix} \\ & = \begin{pmatrix} 2 + (-2) & 3 + 0 \\ 1 + 7 & -5 + (-1) \end{pmatrix}\\ A - B & = \begin{pmatrix} 0 & 3 \\ 8 & -6 \end{pmatrix} \end{aligned}\]


Example 2

Given the matrices \(M = \begin{pmatrix} 3 & 5 \\ -2 & 0 \\ 1 & 6 \end{pmatrix}\) and \(N = \begin{pmatrix} 0 & 2 \\ 3 & 4 \\ -7 & 1 \end{pmatrix}\), below we show how to calculate \(M+N\) as well as \(M - N\).

Addition

\[\begin{aligned} M + N & = \begin{pmatrix} 3 & 5 \\ -2 & 0 \\ 1 & 6 \end{pmatrix} + \begin{pmatrix} 0 & 2 \\ 3 & 4 \\ -7 & 1 \end{pmatrix}\\ & = \begin{pmatrix} 3 +0 & 5 +2\\ -2 +3 & 0 + 4\\ 1 + (-7) & 6 +1\end{pmatrix} \\ M + N & = \begin{pmatrix} 3 & 7 \\ 1 & 4\\ -6 & 7 \end{pmatrix} \end{aligned} \]


Subtraction

\[\begin{aligned} M - N & = \begin{pmatrix} 3 & 5 \\ -2 & 0 \\ 1 & 6 \end{pmatrix} - \begin{pmatrix} 0 & 2 \\ 3 & 4 \\ -7 & 1 \end{pmatrix}\\ & = \begin{pmatrix} 3 - 0 & 5 - 2\\ -2 - 3 & 0 - 4\\ 1 - (-7) & 6 - 1\end{pmatrix} \\ M - N & = \begin{pmatrix} 3 & 3 \\ -5 & -4\\ 8 & 5 \end{pmatrix} \end{aligned} \]


Multiplication by a Scalar


Given a matrix \(A\), we can multiply \(A\) by any scalar \(k \in \mathbb{R}\) by multiplying each of the entries of \(A\) by \(k\). This is shown here for a \(2\times 2\) matrix: \[ k\times A = k\times \begin{pmatrix} a_{11} & a_{11} \\ a_{11} & a_{11} \end{pmatrix} = \begin{pmatrix} k\times a_{11} & k\times a_{11} \\ k\times a_{11} & k\times a_{11} \end{pmatrix} \]

Example 3

  1. Given the matrix \(A\) defined as \(A = \begin{pmatrix} 1 & -3 \\ 0 & 5 \end{pmatrix}\), we can multiply this matrix by \(2\) as follows: \[\begin{aligned} 2\times A & = 2\times \begin{pmatrix} 1 & -3 \\ 0 & 5 \end{pmatrix} \\ & = \begin{pmatrix} 2\times 1 & 2\times (-3) \\ 2\times 0 & 2\times 5 \end{pmatrix} \\ 2A & = \begin{pmatrix} 2 & -6 \\ 0 & 10 \end{pmatrix} \end{aligned}\]

  2. Given the matrix \(B\) defined as \(B = \begin{pmatrix} 2 & 1 \\ -4 & 8 \\ 6 & 0 \end{pmatrix}\), we can multiply this matrix by \(-3\) as follows: \[\begin{aligned} -3 \times B & = -3\times \begin{pmatrix} 2 & 1 \\ -4 & 8 \\ 6 & 0 \end{pmatrix} \\ & = \begin{pmatrix} -3 \times 2 & -3 \times 1 \\ -3 \times (-4) & -3 \times 8 \\ -3 \times 6 & -3 \times 0 \end{pmatrix} \\ -3B & = \begin{pmatrix} -6 & -3 \\ 12 & -24 \\ -18 & 0 \end{pmatrix} \end{aligned}\]


Linear Combinations


Given two matrices \(A\) and \(B\) of the same order and two scalars \(m\) and \(n \) in \(\mathbb{R}\), we call a linear combination of \(A\) and \(B\) any expression that can be written: \[m .A + n . B\]


Example 4

Given \(A = \begin{pmatrix} 1 & 0 & 3 \\ 2 & 7 & -4 \end{pmatrix}\) and \(B = \begin{pmatrix} 3 & 2 & 5 \\ 1 & 6 & 9 \end{pmatrix}\) find \(3A-2B\).

Solution

\[\begin{aligned} 3A - 2B & = 3 \times \begin{pmatrix} 1 & 0 & 3 \\ 2 & 7 & -4 \end{pmatrix} - 2 \times \begin{pmatrix} 3 & 2 & 5 \\ 1 & 6 & 9 \end{pmatrix} \\ & = \begin{pmatrix} 3 & 0 & 9 \\ 6 & 21 & -12 \end{pmatrix} - \begin{pmatrix} 6 & 4 & 10 \\ 2 & 12 & 18 \end{pmatrix} \\ 3A - 2B & = \begin{pmatrix} -3 & -4 & -1 \\ 4 & 9 & -30 \end{pmatrix} \end{aligned}\]


Exercise 1

  1. Given the matrices \(A = \begin{pmatrix} 2 & 1 \\ 5 & -3 \\ 0 & 4\end{pmatrix}\) and \(B = \begin{pmatrix} 6 & -1 \\ 2 & 0 \\ 1 & 3 \end{pmatrix}\), find:
    1. \(3A\)
    2. \(-2B\)
    3. \(-A\)
    1. \(A+B\)
    2. \(A - B\)
    3. \(B-A\)

  2. Given the matrices \(A = \begin{pmatrix} 2 & -1 \\ 4 & 3 \end{pmatrix}\), \(B = \begin{pmatrix} 5 & 0 \\ -6 & 2 \end{pmatrix}\), \(C = \begin{pmatrix} 3 & -2 & 0 \\ 5 & 1 & 6 \\ 8 & 7 & -4 \end{pmatrix}\) and \(D = \begin{pmatrix} 1 & 0 & -1 \\ 2 & 5 & 8 \\ 0 & 4 & 7 \end{pmatrix}\), find:
    1. \(A+B\)
    2. \(3B-A\)
    1. \(2C-D\)
    2. \(3D + 2C\)

  3. Given \(M = \begin{pmatrix} 3 & 0 & 2 \\ -5 & 1 & 4 \end{pmatrix}\), \(N = \begin{pmatrix} 4 & -3 & 1 \\ 6 & 0 & 2 \end{pmatrix}\) and \(P = \begin{pmatrix} 0 & 1 & 0 \\ 5 & -2 & 3 \end{pmatrix}\), find:
    1. \(2M+3P\)
    2. \(3N-M\)
    1. \(M + 2N + P\)
    2. \(3M - N + P\)

Note: this exercise can be downloaded as a worksheet to practice with: Worksheet 1

Scan this QR-Code with your phone/tablet and view this page on your preferred device.


Subscribe to Our Channel


Subscribe Now and view all of our playlists & tutorials.