- Written By
Priya Wadhwa
- Last Modified 24-01-2023
Operation on Matrices: Addition, Subtraction & Multiplication, Examples
You have landed on the right page to learn about Operation of Matrices. The addition of matrices, subtraction of matrices, and multiplication of matrices are the three most common algebraic operations used in matrices. A matrix is a rectangular array of numbers or expressions arranged in rows and columns. Mathematical uses of matrices are numerous.
This article covers all the matrix operations such as addition, subtraction, and multiplication and their properties and solved examples. There is no such thing as a division in matrices. Matrixes can be added, subtracted, and multiplied, but they cannot be divided. However, there is a similar notion known as inversion.
Introduction
Before beginning the operation, it is necessary to understand the elementary row operation and elementary column operation of a matrix.
A matrix is a collection of numbers organized into rows and columns. The dimensions of a matrix are the number of rows and columns, denoted as \(m \times n,\) where \(m\) and \(n\) are the number of rows and columns, respectively. Aside from basic mathematical operations, some basic operations can be performed on matrices, such as transformations.
Elementary Row Operations
When the operation is performed only on rows of a matrix.
For example: Any two rows of a matrix can be exchanged. If the \({i^{{\rm{th}}}}\) and \({j^{{\rm{th}}}}\) rows are exchanged, it is shown by \({R_i} \leftrightarrow {R_j}.\)
\(A = \left[ {\begin{array}{*{20}{c}}
1&9\\
\begin{array}{l}
2\\
6
\end{array}&\begin{array}{l}
\,\,5\\
– 3
\end{array}
\end{array}} \right]\)
We apply \({R_1} \leftrightarrow {R_2}\) and obtain
\(A = \left[ {\begin{array}{*{20}{c}}
2&5\\
\begin{array}{l}
1\\
6
\end{array}&\begin{array}{l}
\,\,9\\
– 3
\end{array}
\end{array}} \right]\)
The elements of any row can be added with the corresponding elements of another row which is multiplied by a non-zero number. So if we add the \({i^{{\rm{th}}}}\) row of a matrix to the \({j^{{\rm{th}}}}\) row which is multiplied by a non-zero number \(k,\) symbolically it can be denoted by \({R_i} \to {R_i} + k{R_j}\)
\(A = \left[ {\begin{array}{*{20}{c}}
1&9\\
\begin{array}{l}
2\\
6
\end{array}&\begin{array}{l}
\,\,5\\
– 3
\end{array}
\end{array}} \right]\)
We apply \({R_1} \to {R_2} + 3{R_2}\) and obtain
\(A = \left[ {\begin{array}{*{20}{c}}
7&{24}\\
\begin{array}{l}
2\\
6
\end{array}&\begin{array}{l}
\,\,5\\
– 3
\end{array}
\end{array}} \right]\)
if we add the \({i^{{\rm{th}}}}\) column of a matrix to the \({j^{{\rm{th}}}}\) column which is multiplied by a non-zero number \(k,\) symbolically it can be denoted by \({C_i} \to {C_i} + k{C_j}\)
\(A = \left[ {\begin{array}{*{20}{c}}
1&9\\
\begin{array}{l}
2\\
6
\end{array}&\begin{array}{l}
\,\,5\\
– 3
\end{array}
\end{array}} \right]\)
We apply \({C_1} \to {C_1} + 3{C_2}\) and obtain
\(A = \left[ {\begin{array}{*{20}{c}}
{28}&9\\
\begin{array}{l}
17\\
– 3
\end{array}&\begin{array}{l}
\,\,5\\
– 3
\end{array}
\end{array}} \right]\)
Elementary Column Operations
When the operation is performed only on columns of a matrix.
Similarly, If the \({i^{{\rm{th}}}}\) and \({i^{{\rm{th}}}}\) columns are exchanged, it is shown by \({C_i} \leftrightarrow {C_j}.\)
\(A = \left[ {\begin{array}{*{20}{c}}
1&9\\
\begin{array}{l}
2\\
6
\end{array}&\begin{array}{l}
\,\,5\\
– 3
\end{array}
\end{array}} \right]\)
We apply \({C_1} \leftrightarrow {C_2}\) and obtain
\(A = \left[ {\begin{array}{*{20}{c}}
9&1\\
\begin{array}{l}
\,\,5\\
– 3
\end{array}&\begin{array}{l}
2\\
6
\end{array}
\end{array}} \right]\)
Operations on Matrices
The basic operations on the matrix are addition, subtraction, and multiplication. To add or subtract matrices, they must be in the same order, and for multiplication, the first matrix’s number of columns must equal the second matrix’s number of rows.
- Addition of Matrices
- Subtraction of Matrices
- Scalar Multiplication of Matrices
- Multiplication of Matrices
Addition of Matrices
If \(A = {\left[ {{a_{ij}}} \right]_{m \times n}}\) and \(B = {\left[ {{b_{ij}}} \right]_{m \times n}}\) are two matrices of the same order, their addition \(A+B\) is a matrix, with each element being the sum of the corresponding elements. i.e.
\({\left[ {{a_{ij}} + {b_{ij}}} \right]_{m \times n}} = A + B\)
Consider the two \(2 \times 2\) matrices \(A\) and \(B.\) The addition of two matrices is then calculated as follows:
\(\left[ {\begin{array}{*{20}{c}}
{{a_1}}&{{b_1}}\\
{{c_1}}&{{d_1}}
\end{array}} \right] + \left[ {\begin{array}{*{20}{c}}
{{a_2}}&{{b_2}}\\
{{c_2}}&{{d_2}}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
{{a_1} + {a_2}}&{{b_1} + {b_2}}\\
{{c_1} + {c_2}}&{{d_1} + {d_2}}
\end{array}} \right]\)
Properties of Matrix Addition: If \(A, B,\) and \(C\) are three matrices of the same order, then
(a) Commutative Law: \(A+B=B+A\)
(b) Associative Law: \((A+B)+C=A+(B+C)\)
(c) Identity of the Matrix: \(A+O=O+A=A\)
where \(O\) is zero matrix which is the additive identity of the matrix,
(d) Additive Inverse: \(A+(-A)=0=(-A)+A\)
where \((-A)\) is obtained by changing the sign of every element of \(A,\) which is the additive inverse of the matrix.
(e) \(A + B = A + CB + A = C + A\} \Rightarrow B = C\)
(f) \({\mathop{\rm tr}\nolimits} (A \pm B) = {\mathop{\rm tr}\nolimits} (A) \pm {\mathop{\rm tr}\nolimits} (B),\) where \({\mathop{\rm tr}\nolimits} \) represents the trace of a matrix
(g) If \(A+B=0=B+A,\) then \(B\) is called the additive inverse of \(A\) and also \(A\) is called the additive inverse of \(B.\)
Subtraction of Matrices
If \(A\) and \(B\) are two matrices of the same order, then the subtraction of the matrices is defined as
\(A – B = A + ( – B)\)
Consider the two \(2 \times 2\) matrices \(A\) and \(B.\) The difference is then calculated as follows:
\(\left[ {\begin{array}{*{20}{c}}
{{a_1}}&{{b_1}}\\
{{c_1}}&{{d_1}}
\end{array}} \right] – \left[ {\begin{array}{*{20}{c}}
{{a_2}}&{{b_2}}\\
{{c_2}}&{{d_2}}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
{{a_1} – {a_2}}&{{b_1} – {b_2}}\\
{{c_1} – {c_2}}&{{d_1} – {d_2}}
\end{array}} \right]\)
We can subtract the matrices by subtracting each element of one matrix from the corresponding element of the second matrix. i.e.
\(A – B = {\left[ {{a_{ij}} – {b_{ij}}} \right]_{m \times n}}\)
Scalar Multiplication of Matrices
If \(A = {\left[ {{a_{ij}}} \right]_{m \times n}}\) is a matrix and \(k\) any number, then the matrix which is obtained by multiplying the elements of \(A\) by the scalar \(k\) is called the scalar multiplication of \(A\) by \(k,\) and it is denoted by \(kA\) thus if \(A = {\left[ {{a_{ij}}} \right]_{m \times n}}\)
Then \(k{A_{m \times n}} = {A_{m \times n}}k = {\left[ {k{a_{ij}}} \right]_{m \times n}}\)
Properties of Scalar Multiplication: If \(A, B\) are matrices of the same order and and are any two scalars then;
(a) \(\lambda (A + B) = \lambda A + \lambda B\)
(b) \((\lambda + \mu )A = \lambda A + \mu A\)
(c) \(\lambda \left({\mu A} \right) = \left({\lambda \mu A} \right) = \mu \left({\lambda A} \right)\)
(d) \(( – \lambda A) = – (\lambda A) = \lambda ( – A)\)
(e) \({\mathop{\rm tr}\nolimits} (kA) = {\mathop{\rm ktr}\nolimits} (A)\)
Multiplication of Matrices
If \(A\) and \(B\) are any two matrices, then their product \(AB\) will be defined only when the number of columns in \(A\) is equal to the number of rows in \(B.\)
If \(A = {\left[ {{a_{ij}}} \right]_{m \times n}}.\) and \(B = {\left[ {{b_{ij}}} \right]_{n \times p}}\) then their product \(AB = C = {\left[ {{c_{ij}}} \right]_{m \times p}}\) will be a matrix of order \(m \times p\) where \({(AB)_{ij}} = {C_{ij}} = \sum\limits_{r = 1}^n {{a_{ir}}} {b_{rj}}\)
Finding the components \({C_{ij}}\) of the product matrix by multiplying the elements of the \({i^{{\text{th}}}}\) row of matrix \(A\) by the elements of the \({j^{{\rm{th}}}}\) column of matrix \(B\) is the process of multiplying the matrices.
Properties of Matrix Multiplication:
(a) In general, matrix multiplication is not commutative.
That is \(AB≠BA\)
(b) Multiplication of matrices is associative.
That is \((AB)C=A(BC).\)
(c) Multiplication of matrices is distributive over matrix addition.
That is \(A(B+C)=AB+AC\) and \((A+B)C=AC+BC\)
(d) If A is an \(m \times n\) matrix, then \({I_{m \times m}}{A_{m \times n}} = A = {A_{m \times n}}{I_{n \times n}}\)
(e) When neither of the matrices is null, the product of the two can be a null matrix. That is
, if \(AB=0,\) it is not required that either \(A=0\) or \(B=0.\)
(f) When \(A\) is a \(m \times n\) matrix, and \(O\) is a null matrix, the result is \({A_{m \times n}}{O_{n \times p}} = {O_{m \times p}}\) i.e., a null matrix is always a null matrix when a matrix is multiplied by a null matrix.
(g) If \(AB=O\) (this does not imply that \(A\) or \(B\) are zero matrices; the product of two non-zero matrices might be zero matrix).
(h) If \(AB=AC,\) then \(B≠C.\) (Cancellation Law is not applicable).
(i) \({\mathop{\rm tr}\nolimits} (AB) = {\mathop{\rm tr}\nolimits} (BA)\)
(j) Every square matrix has a multiplicative identity, such as \(AI = IA = A.\)
Solved Examples– Operations on Matrices
Q.1. If \(A = \left[ {\begin{array}{*{20}{c}}
2&1&3\\
3&{ – 2}&1\\
{ – 1}&0&1
\end{array}} \right]\) and \(B = \left[ {\begin{array}{*{20}{c}}
1&{ – 2}\\
\begin{array}{l}
2\\
4
\end{array}&\begin{array}{l}
\,\,1\\
– 2
\end{array}
\end{array}} \right]\)
Find the product \(AB\) and \(BA\) if possible.
Ans: Given, \(A = \left[ {\begin{array}{*{20}{c}}
2&1&3\\
3&{ – 2}&1\\
{ – 1}&0&1
\end{array}} \right]\) and \(B = \left[ {\begin{array}{*{20}{c}}
1&{ – 2}\\
\begin{array}{l}
2\\
4
\end{array}&\begin{array}{l}
\,\,1\\
– 2
\end{array}
\end{array}} \right]\)
Here, \(A\) is a \(3×3\) matrix, and \(B\) is a \(3×2\) matrix. Therefore, \(A\) and \(B\) are conformable for the product \(AB,\) and it is of the order \(3×2\)
Multiplying the elements of the \({i^{{\rm{th}}}}\) row of matrix \(A\) by the elements of the \({j^{{\rm{th}}}}\) column of matrix \(B\)
Then \(AB = \left[ {\begin{array}{*{20}{c}}
2&1&3\\
3&{ – 2}&1\\
{ – 1}&0&1
\end{array}} \right]\left[ {\begin{array}{*{20}{c}}
1&{ – 2}\\
\begin{array}{l}
2\\
4
\end{array}&\begin{array}{l}
\,\,1\\
– 2
\end{array}
\end{array}} \right]\)
\( = \left[ {\begin{array}{*{20}{c}}
{2 \times 1 + 1 \times 2 + 3 \times 4}&{2 \times \left( { – 2} \right) + 1 \times 1 + 3 \times \left( { – 2} \right)}\\
\begin{array}{l}
3 \times 1 + \left( { – 2} \right) \times 2 + 1 \times 4\\
– 1 \times 1 + 0 \times 2 + 1 \times 4
\end{array}&\begin{array}{l}
3 \times \left( { – 2} \right) + \left( { – 2} \right) \times 1 + 1 \times \left( { – 2} \right)\\
– 1 \times \left( { – 2} \right) + 0 \times 1 + 1 \times \left( { – 2} \right)
\end{array}
\end{array}} \right]\)
\( = \left[ {\begin{array}{*{20}{c}}
{16}&{ – 12}\\
\begin{array}{l}
3\\
3
\end{array}&\begin{array}{l}
– 10\\
\,\,0
\end{array}
\end{array}} \right]\)
\(BA\) is not possible since number of columns of \(B≠\) Number of rows of \(A.\)
Q.2. Find the value of x and y from the following
\(3\left[ {\begin{array}{*{20}{c}}
1&2\\
\begin{array}{l}
2\\
0
\end{array}&\begin{array}{l}
1\\
x
\end{array}
\end{array}} \right] + \left[ {\begin{array}{*{20}{c}}
6&{ – 2}\\
\begin{array}{l}
3\\
8
\end{array}&\begin{array}{l}
y\\
4
\end{array}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
9&4\\
\begin{array}{l}
9\\
8
\end{array}&\begin{array}{l}
5\\
0
\end{array}
\end{array}} \right]\)
Ans: Using the method of scalar multiplication and addition of matrices, then equating the corresponding elements of L.H.S. and R.H.S., we can easily get the required values of \(x\) and \(y.\)
We have, \(3\left[ {\begin{array}{*{20}{c}}
1&2\\
\begin{array}{l}
2\\
0
\end{array}&\begin{array}{l}
1\\
x
\end{array}
\end{array}} \right] + \left[ {\begin{array}{*{20}{c}}
6&{ – 2}\\
\begin{array}{l}
3\\
8
\end{array}&\begin{array}{l}
y\\
4
\end{array}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
9&4\\
\begin{array}{l}
9\\
8
\end{array}&\begin{array}{l}
5\\
0
\end{array}
\end{array}} \right]\)
\( \Rightarrow \left[ {\begin{array}{*{20}{c}}
3&6\\
\begin{array}{l}
6\\
0
\end{array}&\begin{array}{l}
3\\
3x
\end{array}
\end{array}} \right] + \left[ {\begin{array}{*{20}{c}}
6&{ – 2}\\
\begin{array}{l}
3\\
8
\end{array}&\begin{array}{l}
y\\
4
\end{array}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
9&4\\
\begin{array}{l}
9\\
8
\end{array}&\begin{array}{l}
5\\
0
\end{array}
\end{array}} \right]\)
\( \Rightarrow \left[ {\begin{array}{*{20}{c}}
{3 + 6}&{6 – 2}\\
\begin{array}{l}
6 + 3\\
0 + 8
\end{array}&\begin{array}{l}
3 + y\\
3x + 4
\end{array}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
9&4\\
\begin{array}{l}
9\\
8
\end{array}&\begin{array}{l}
5\\
0
\end{array}
\end{array}} \right]\)
Equating the corresponding elements, \({a_{22}}\) and \({a_{32}}\) we get
\(3 + y = 5 \Rightarrow y = 5 – 3 = 2\)
And \(3x + 4 = 0 \Rightarrow x = – \frac{4}{3}\)
Hence \(x = 2\) and \(y = – \frac{4}{3}.\)
Q.3. Find the value of \(x, y, z\) and \(w,\) if \(\left[ {\begin{array}{*{20}{c}}
{x – y}&{2x + z}\\
{2x – y}&{3z + w}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
{ – 1}&5\\
0&{13}
\end{array}} \right]\)
Ans: As the two matrices are equal, their corresponding elements are identical. Therefore, by equating the corresponding elements of given matrices, we will obtain the value of \(x, y, z\) and \(w.\)
\(\left[ {\begin{array}{*{20}{c}}
{x – y}&{2x + z}\\
{2x – y}&{3z + w}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
{ – 1}&5\\
0&{13}
\end{array}} \right]\)
\(x – y = – 1 \ldots {\rm{(i)}}\)
\(2x + z = 5 \ldots {\rm{(ii)}}\)
\(2x – y = 0 \ldots {\rm{(iii)}}\)
\(3z + w = 13 \ldots {\rm{(iv)}}\)
Subtracting equation \(\left( {\rm{i}} \right)\) from \(\left( {\rm{iii}} \right),\) we have \(x = 1;\)
Putting the value of \(x\) in equation \({\rm{(i),}}\) we get \(y=2\)
Putting the value of \(x\) in equation \({\rm{(ii),}}\) we have \(2 + z = 5 \Rightarrow z = 3;\)
Putting the value of \(z\) in equation \({\rm{(iv),}}\) we find \(9 + w = 13 \Rightarrow w = 4\)
Hence \(x = 1,y = 2,z = 3,w = 4\)
Q.4. Find \(a\) and \(b,\) if \(2a + 3b = \left[ {\begin{array}{*{20}{c}}
2&3\\
4&0
\end{array}} \right]\) and \(3a + 2b = \left[ {\begin{array}{*{20}{c}}
2&{ – 2}\\
{ – 1}&5
\end{array}} \right]\)
Ans: Solving the given equations simultaneously, we will obtain the values of \(a\) and \(b.\)
We have \(2a + 3b = \left[ {\begin{array}{*{20}{c}}
2&3\\
4&0
\end{array}} \right]\)….(i)
and \(3a + 2b = \left[ {\begin{array}{*{20}{c}}
2&{ – 2}\\
{ – 1}&5
\end{array}} \right]\)….(ii)
Multiplying (i) by \(3\) and (ii) by \(2,\) we get \(6a + 9b = \left[ {\begin{array}{*{20}{c}}
6&9\\
{12}&0
\end{array}} \right]\)….(iii)
\(6a + 4b = \left[ {\begin{array}{*{20}{c}}
4&{ – 4}\\
{ – 2}&{10}
\end{array}} \right]\)….(iv)
Subtracting (iv) from (iii), we get \(5b = \left[ {\begin{array}{*{20}{c}}
{6 – 4}&{9 + 4}\\
{12 – 2}&{0 – 10}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
2&{13}\\
{14}&{ – 10}
\end{array}} \right]\)
\( \Rightarrow b = \left[ {\begin{array}{*{20}{c}}
{\frac{2}{5}}&{\frac{{13}}{5}}\\
{\frac{{14}}{5}}&{ – \frac{{10}}{5}}
\end{array}} \right]\)
\( \Rightarrow b = \left[ {\begin{array}{*{20}{c}}
{\frac{2}{5}}&{\frac{{13}}{5}}\\
{\frac{{14}}{5}}&{ – 2}
\end{array}} \right]\)
Putting the value of \(b\) in (i), we get \(2a + 3\left[ {\begin{array}{*{20}{c}}
{\frac{2}{5}}&{\frac{{13}}{5}}\\
{\frac{{14}}{5}}&{ – 2}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
2&3\\
4&0
\end{array}} \right]\)
\( \Rightarrow 2a = \left[ {\begin{array}{*{20}{c}}
2&3\\
4&0
\end{array}} \right] – \left[ {\begin{array}{*{20}{c}}
{\frac{6}{5}}&{\frac{{39}}{5}}\\
{\frac{{42}}{5}}&{ – 6}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
{2 – \frac{6}{5}}&{3 – \frac{{39}}{5}}\\
{4 – \frac{{42}}{5}}&{0 + 6}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
{\frac{4}{5}}&{\frac{{ – 24}}{5}}\\
{ – \frac{{22}}{5}}&6
\end{array}} \right]\)
\(a = \left[ {\begin{array}{*{20}{c}}
{\frac{2}{5}}&{\frac{{ – 12}}{5}}\\
{ – \frac{{11}}{5}}&3
\end{array}} \right]\)
Hence, \(a = \left[ {\begin{array}{*{20}{c}}
{\frac{2}{5}}&{\frac{{ – 12}}{5}}\\
{ – \frac{{11}}{5}}&3
\end{array}} \right]\) and \(b = \left[ {\begin{array}{*{20}{c}}
{\frac{2}{5}}&{\frac{{13}}{5}}\\
{\frac{{14}}{5}}&{ – 2}
\end{array}} \right]\)
Q.5. Find the difference of \(A-B,\) where \(A = \left[ {\begin{array}{*{20}{c}} { – 2}&3\\ 0&1 \end{array}} \right]\) and \(B = \left[ {\begin{array}{*{20}{c}} 8&1\\ 5&4 \end{array}} \right]\)
Ans: Given, \(A = \left[ {\begin{array}{*{20}{c}} { – 2}&3\\ 0&1 \end{array}} \right]\) and \(B = \left[ {\begin{array}{*{20}{c}} 8&1\\ 5&4 \end{array}} \right]\)
To find the difference between two matrices, we subtract the corresponding entries of each matrix.
\(A – B = \left[ {\begin{array}{*{20}{c}} { – 2}&3\\ 0&1 \end{array}} \right] – \left[ {\begin{array}{*{20}{c}} 8&1\\ 5&4 \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} { – 1 – 8}&{3 – 1}\\ {0 – 5}&{1 – 4} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} { – 10}&2\\ { – 5}&{ – 3} \end{array}} \right]\)
Summary
The basics of Matrices, elementary row operations, and elementary column operations were discussed in this article. The operations on matrices, such as addition on matrices, subtraction on matrices, and multiplication on matrices, have been thoroughly studied. We have also looked at the properties of addition, subtraction, and multiplication on matrices and the solved examples.
Frequently Asked Questions
Q.1. What are the operations in matrices?
Ans: The addition of matrices, subtraction of matrices, and multiplication of matrices are the three most common algebraic operations used in matrices.
Q.2. What is a matrix?
Ans: A matrix is a rectangular array of numbers or expressions arranged in rows and columns.
Q.3. How do you implement operations using matrices?
Ans: The basic operations on the matrix are addition, subtraction, and multiplication. To add or subtract matrices, they must be in the same order, and for multiplication, the number of columns of the first matrix must equal the number of rows of the second matrix.
Q.4. Which operation is not done on a matrix?
Ans: There is no such thing as the division in matrices. Matrixes can be added, subtracted, and multiplied, but they cannot be divided. However, there is a comparable notion known as inversion.
Q.5. Can you mix row and column operations in matrix?
Ans: Yes, if you are just interested in the rank of a matrix, you can reduce it to a matrix with at most one non-zero item in each row and column by using both row and column operations. The number of non-zero rows or columns determines the matrix’s rank.
We hope you find this detailed article on operations on matrices helpful. If you have any doubts or queries regarding this topic, feel to ask us in the comment section. Happy learning!