Here you will learn multiplication of matrices with definition and examples.
Let’s begin –
Multiplication of Matrices
Definition : Two matrices A and B are conformable for the product AB if the number of columns in A is same as the number of row in B.
Let matrix A is of order \(m\times n\) then m is the number of rows and n is the number of coumns in A
and matrix B is of order \(n\times p\) then n is the number of rows and p is the number of columns in B.
Thus, if A = \([a_{ij}]_{m\times n}\) and B = \([b_{ij}]_{n\times p}\) are two matrices of order \(m\times n\) and \(n\times p\) respectively, then their product AB is conformable and of order \(m\times p\) and is defined as
\((AB)_{ij}\) = ( \(i^{th}\) row of A) (( \(j^{th}\) column of B) for all i = 1, 2, ….., m and j = 1, 2, ……. , p.
\(\implies\) \((AB)_{ij}\) = \(\begin{bmatrix} a_{i1} & a_{i2} & …… & a_{in} \end{bmatrix}\) \(\begin{bmatrix} b_{1j} \\ b_{2j} \\ . \\ . \\ . \\ b_{nj} \end{bmatrix}\)
Note : If A and B are two matrices such that AB exists, then BA may or may not exist.
Example :
If A = \(\begin{bmatrix} 2 & 1 & 3 \\ 3 & -2 & 1 \\ -1 & 0 & 1 \end{bmatrix}\) and B = \(\begin{bmatrix} 1 & -2 \\ 2 & 1 \\ 4 & -3 \end{bmatrix}\), then A is a \(3\times 3\) matrix and B is a \(3\times 2\) matrix. Therefore, A and b are conformable for the product AB and it is of order \(3\times 2\) such that
\((AB)_{11}\) = (first row of A)(first column of B)
\(\implies\) \((AB)_{11}\) = \(\begin{bmatrix} 2 & 1 & 3 \end{bmatrix}\) \(\begin{bmatrix} 1 \\ 2 \\ 4 \end{bmatrix}\)
= 2*1 + 1*2 + 3*4 = 16
\((AB)_{12}\) = (first row of A)(second column of B)
\(\implies\) \((AB)_{12}\) = \(\begin{bmatrix} 2 & 1 & 3 \end{bmatrix}\) \(\begin{bmatrix} -2 \\ 1 \\ 3 \end{bmatrix}\)
= 2*(-2) + 1*1 + 3*(-3) = -12
\((AB)_{21}\) = (second row of A)(first column of B)
\(\implies\) \((AB)_{21}\) = \(\begin{bmatrix} 3 & -2 & 1 \end{bmatrix}\) \(\begin{bmatrix} 1 \\ 2 \\ 4 \end{bmatrix}\)
= 3*1 + (-2)*2 + 1*(4) = 3
Similarly, we obtain
\((AB)_{22}\) = -11 , \((AB)_{31}\) = 3 and \((AB)_{32}\) = -1
\(\therefore\) AB = \(\begin{bmatrix} 16 & -12 \\ 3 & -11 \\ 3 & -1 \end{bmatrix}\)
Note : In this case BA does not exist, because the number of columns in B is not same as the number of rows in A.