We are going to learn here simple operations on matrices.
1) Addition of matrices
If two matrices A and B are of the same order, we say that they are compatible for addition. Their sum A + B is the matrix obtained by adding corresponding elements of A and B
Example:
\( A = \begin{bmatrix} 1&2 \\3&4 \\ \end{bmatrix}\) and \(B = \begin{bmatrix} 2&3 \\0&5 \\ \end{bmatrix} \), then
\(A + B = \begin{bmatrix} 1+2 & 2+3 \\3+0 & 4+5 \\ \end{bmatrix} = \begin{bmatrix} 3 & 5 \\3 & 9 \\ \end{bmatrix}\)
2) Subtraction of matrices
If two matrices A and B are of the same order, we say that they are compatible for subtraction. Their difference A − B is a matrix obtained by subtracting elements of B from corresponding elements of A
\( A = \begin{bmatrix} 1 & 2 \\3 & 4 \\ \end{bmatrix}\) and \(B = \begin{bmatrix} 2 & 3 \\0 & 5 \\ \end{bmatrix} \), then
\(A - B = \begin{bmatrix} 1-2 & 2-3 \\3-0 & 4-5 \\ \end{bmatrix} = \begin{bmatrix} -1 & -1 \\3 & -1 \\ \end{bmatrix}\)
3) Multiplication of a matrix by a number
If k is a number and A is a matrix then matrix kA is obtained by multiplying each element of matrix A by number k
\( A = \begin{bmatrix} 1 & 2 \\3 & 4 \\ \end{bmatrix}\) and k = 5
then \(5 A = \begin{bmatrix} 5\times 1 & 5\times2 \\5\times3 & 5\times4 \\ \end{bmatrix} = \begin{bmatrix} 5 & 10 \\15 & 20 \\ \end{bmatrix}\)
4) Multiplication of matrices
Two matrices A and B are said to be compatible for the product AB, if and only if the number of columns in A is equal to the number of rows in B. If A is of order m × n and B is of order n × p then AB is of order m × p
(i,k)th element of AB = sum of the products of the elements of i th row of A with the corresponding elements of the kth column of B
For example:
\( A = \begin{bmatrix} 1 & 2 \\3 & 4 \\ \end{bmatrix} B = \begin{bmatrix} 1 \\ 2 \end{bmatrix}\)
As A is 2×2 order matrix and B is 2×1 order matrix, hence their product A×B is possible. But B×A is not feasible as the number of columns of B is not equal to the number of rows of A
\( A \times B = \begin{bmatrix} 1\times1+2\times2 \\3\times1+4\times2 \\ \end{bmatrix} = \begin{bmatrix} 5 \\11 \\ \end{bmatrix}\)