Content code
m1467
Slug (identifier)
matrix-operations
Parent content
Grades
Secondary V
Topic
Mathematics
Content
Contenu
Corps

Various mathematical operations can be performed on matrices:

Links
Title (level 2)
Adding and Subtracting Matrices
Title slug (identifier)
adding-and-subtracting
Contenu
Content
Corps

Adding and subtracting matrices is possible only when the two matrices have the same dimensions, i.e., they have the same number of rows and columns.

Corps

To add two matrices, we need to add the elements in the same positions in each matrix. The sum obtained is a new matrix.

Content
Corps

Below is an example of adding two matrices:

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

Content
Corps

When adding the matrices |A| and |B| , the result is the following:

|A+B=\begin{pmatrix}
6 & 5 & 4\\
4 & 3 & 5
\end{pmatrix}+\begin{pmatrix}
3 & 4 & 2\\
4 & 4 & 3
\end{pmatrix}=\begin{pmatrix}
6+3 & 5+4 & 4+2\\
4+4 & 3+4 & 5+3
\end{pmatrix}|

Thus, obtaining the new matrix |C|:

|\begin{pmatrix}
6 & 5 & 4\\
4 & 3 & 5
\end{pmatrix}+\begin{pmatrix}
3 & 4 & 2\\
4 & 4 & 3
\end{pmatrix}=\begin{pmatrix}
9 & 9 & 6\\
8 & 7 & 8
\end{pmatrix}=C|

Corps

To subtract two matrices, we need to subtract from the elements of the first matrix the elements occupying the same position in the second matrix. It is also possible to add the opposite of the second matrix to the first matrix instead of subtracting it. Like with adding, subtracting two matrices results in a new matrix.

Content
Corps

Below is an example of subtracting two matrices:

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

Content
Corps

If matrix |B| is subtracted from matrix |A| in the example below:

|A-B=\begin{pmatrix}
3 & 4 & 4\\
5 & 4 & 6
\end{pmatrix}-\begin{pmatrix}
2 & 5 & 1\\
6 & 4 & 4
\end{pmatrix}=\begin{pmatrix}
3-2 & 4-5 & 4-1\\
5-6 & 4-4 & 6-4
\end{pmatrix}=C|

The new matrix |C| is obtained:

|A-B=\begin{pmatrix}
3 & 4 & 4\\
5 & 4 & 6
\end{pmatrix}-\begin{pmatrix}
2 & 5 & 1\\
6 & 4 & 4
\end{pmatrix}=\begin{pmatrix}
1 & -1 & 3\\
-1 & 0 & 2
\end{pmatrix}=C|

Title (level 2)
Multiplying a Matrix by a Scalar
Title slug (identifier)
scalar
Contenu
Corps

To multiply a matrix by a scalar, we must multiply all of its elements by the scalar. The product obtained is a new matrix.

Content
Corps

Here is an example of multiplying a matrix by a scalar:

|k\times\begin{pmatrix}
a & b\\
c & d
\end{pmatrix}=\begin{pmatrix}
ka & kb\\
kc & kd
\end{pmatrix}|

Content
Corps

|4\times\begin{pmatrix}
1 & 5 & 2\\
-1 & 7 & -3
\end{pmatrix}=\begin{pmatrix}
4 & 20 & 8\\
-4 & 28 & -12
\end{pmatrix}|

Title (level 2)
Multiplying Matrices
Title slug (identifier)
multiplication
Contenu
Content
Corps

The product of matrix |A| and matrix |B| is possible if and only if the number of columns in the matrix |A| is equal to the number of rows in the matrix |B| .

Corps

The product obtained by multiplying two matrices is a new matrix |C|.

Content
Corps

Consider the multiplication of the following matrices:

|A_{m\times p}\times B_{p\times n}=C_{m\times n}|

The new matrix has the same number of rows as matrix |A| and the same number of columns as matrix |B|.

Corps

To determine an element in matrix |C|, we need to:

  1. Multiply, in order, each element in row |A| by each element in column |B|.

  2. Add all of the products to obtain a new element in matrix |C|.

The following is a diagram representing the case of two matrices |3 \times 3|:

Image
Matrix
Content
Corps
  1. We multiply, in order, each element of a row in the first matrix |A| by each element of a column in the second matrix |B| and we continue to do this for all elements of the two matrices.

    |\small A \times B=\begin{pmatrix}
    {\color{Blue} 1} & {\color{Blue} 2}\\
    {\color{Red} 0} & {\color{Red} 4}\\
    3 & -1
    \end{pmatrix}\times\begin{pmatrix}
    {\color{Magenta} 2} & {\color{DarkGreen} 0}\\
    {\color{Magenta} 1} & {\color{DarkGreen} -3}
    \end{pmatrix}=\begin{pmatrix}
    {\color{Blue} 1}\times{\color{Magenta} 2}+{\color{Blue} 2}\times {\color{Magenta} 1} & {\color{Blue} 1}\times{\color{DarkGreen} 0}+{\color{Blue} 2}\times {\color{DarkGreen} -3}\\
    {\color{Red} 0}\times{\color{Magenta} 2}+{\color{Red} 4}\times {\color{Magenta} 1} & {\color{Red} 0}\times {\color{DarkGreen} 0}+{\color{Red} 4}\times {\color{DarkGreen} -3}\\
    3\times{\color{Magenta} 2}+-1\times {\color{Magenta} 1} & 3\times {\color{DarkGreen} 0}+-1\times {\color{DarkGreen} -3}
    \end{pmatrix}|

  2. We add the products to obtain a new matrix.

    |\begin{pmatrix}
    {\color{Blue} 1}\times{\color{Magenta} 2}+{\color{Blue} 2}\times {\color{Magenta} 1} & {\color{Blue} 1}\times{\color{DarkGreen} 0}+{\color{Blue} 2}\times {\color{DarkGreen} -3}\\
    {\color{Red} 0}\times{\color{Magenta} 2}+{\color{Red} 4}\times {\color{Magenta} 1} & {\color{Red} 0}\times {\color{DarkGreen} 0}+{\color{Red} 4}\times {\color{DarkGreen} -3}\\
    3\times{\color{Magenta} 2}+-1\times {\color{Magenta} 1} & 3\times {\color{DarkGreen} 0}+-1\times {\color{DarkGreen} -3}
    \end{pmatrix}=\begin{pmatrix}
    4 & -6\\
    4 & -12\\
    5 & 3
    \end{pmatrix}|

Answer: The new matrix obtained is |C=\begin{pmatrix}
4 & -6\\
4 & -12\\
5 & 3
\end{pmatrix}|.

Content
Corps

The multiplication of two matrices |A| and |B| is not commutative. Thus, |AB \neq BA| except in very special cases.

Remove audio playback
No