Add, Subtract and Scalar Multiply Matrices

Operations on Matrices such as adding, subtracting and multiplying by a scalar along with the equality of matrices are presented using examples and questions with solutions.

Page Content


Add and Subtract Matrices

Only matrices of the same order can be added or subtracted. We add (or subtract) two matrices by adding (or subtracting) their corresponding entries.

Example 1


Rewrite, if possible, each of the following expressions as a single matrix.
add and subtract matrices

Solution


a) The matrices in part a) have the same order and we therefore can add them by adding their corresponding entries. Hence

Matrix Addition

b) The matrices in part b) do not have the same order and we therefore cannot add them.

c) The matrices in part c) have the same order and we therefore can add them by adding their corresponding entries and simplifying the algebraic expressions.

Matrix Addition with Algebra



Multiply a Matrix by a Scalar

To multiply a matrix by a scalar, you multiply all entries of that matrix by the scalar. Note that scalar multiplication does not change the order of the matrix.
\( \)\( \)\( \)\( \)

Example 2


Express as a single matrix.

a) - 5 \( \begin{bmatrix} 5 & - 7 \\ 4 & 6 \end{bmatrix} \)

b) \( 2 \begin{bmatrix} x & x + y & 6\\ -2 & - x & 1 \end{bmatrix} - 3 \begin{bmatrix} - x & -2y & 0\\ 3x & x & -1 \end{bmatrix} \)

Solution


a) - 5 \( \begin{bmatrix} 5 & - 7 \\ 4 & 6 \end{bmatrix} = \begin{bmatrix} -5(5) & -5(- 7) \\ -5(4) & -5(6) \end{bmatrix}= \begin{bmatrix} -25 & 35 \\ -20 & - 30 \end{bmatrix}\)

b) \( 2 \begin{bmatrix} x & x + y & 6\\ -2 & - x & 1 \end{bmatrix} - 3 \begin{bmatrix} - x & -2y & 0\\ 3x & x & -1 \end{bmatrix} \)

Multiply the first matrix by 2 and the second matrix by 3

\( = \begin{bmatrix} 2(x) & 2(x + y) & 2(6)\\ 2(-2) & 2(- x) & 2(1) \end{bmatrix} - \begin{bmatrix} 3(-x) & 3(-2y) & 3(0)\\ 3(3x) & 3(x) & 3(-1) \end{bmatrix} = \)

Subtract, group and simplify the algebraic expressions

\( = \begin{bmatrix} 5x & 2x+8y & 12\\ -4 - 9x & -5x & 5 \end{bmatrix}\)



Equality of two Matrices

Two matrices are equal if they have the same order (equal number of rows and equal number of columns) and their corresponding entries are equal.


Example 3

Which of the following matrices are equal?

a)   \( \begin{bmatrix} 1 & 2 \\ 3 & 4 \\ \end{bmatrix} \), b)   \( \begin{bmatrix} x & 2x \\ 2 & 1 \\ \end{bmatrix} \), c)   \( \begin{bmatrix} 1 & -x \\ 3x & 5 \\ \end{bmatrix} \), d)   \( \begin{bmatrix} 1 & 2 \\ 3 & 4 \\ \end{bmatrix} \), e)   \( \begin{bmatrix} 1 & 2 & 5\\ 3 & 4 & 8\\ \end{bmatrix} \),


Solution


Matrices a), b), c) and d) have the same order 2 by 2. But only matrices a) and d) are equal as they have equal corresponding entries. Matrix e) has the order 2 by 3 which is different to the order of all other matrices and is therefore not equal to any of the matrices.

Example 4


Find x and y so that \[ \begin{bmatrix} 2x + y & - 7 \\ 4 & 6 \end{bmatrix} = \begin{bmatrix} 2 & - 7 \\ 4 & 4x + y \end{bmatrix} \].

Solution


The two matrices have the same order. For these matrices to be equal, all their corresponding entries have to be equal. Corresponding entries - 7 and 4 are equal. The entries with the unknowns x and y has to be equal. Hence
2 x + y = 2 and 6 = 4 x + y
Solve the above system of equations to find
x = 2 , y = - 2
As an exercise, substitute x by 2 and y by - 2 into the matrices and verify that they are equal.



Questions on Matrices



Solutions to the Questions



More References and links