Show that A B=B A in each of the following cases: A=\left[\begin{array}{ccc} 1 & 3 & -1 \\ 2 & 2 & -1 \\ 3 & 0 & -1 \end{array}\right] \text { and } B=\left[\begin{array}{ccc} -2 & 3 & -1 \\ -1 & 2 & -1 \\ -6 & 9 & -4 \end{array}\right]
Show that A B=B A in each of the following cases: A=\left[\begin{array}{ccc} 1 & 3 & -1 \\ 2 & 2 & -1 \\ 3 & 0 & -1 \end{array}\right] \text { and } B=\left[\begin{array}{ccc} -2 & 3 & -1 \\ -1 & 2 & -1 \\ -6 & 9 & -4 \end{array}\right]

Solution:

We have \boldsymbol{A}=\left(\begin{array}{ccc}\mathbf{1} & \mathbf{3} & -\mathbf{1} \\ \mathbf{2} & \mathbf{2} & -\mathbf{1} \\ \mathbf{3} & \mathbf{0} & -\mathbf{1}\end{array}\right) and \boldsymbol{B}=\left(\begin{array}{ccc}-2 & \mathbf{3} & -\mathbf{1} \\ -\mathbf{1} & \mathbf{2} & -\mathbf{1} \\ -\mathbf{6} & \mathbf{9} & -\mathbf{4}\end{array}\right)
Now multiplication of two matrices is possible if number of columns in left matrix is equals to the number of rows in right matrix.

Next let us discuss the order of the matrices which are given. The order of matrix \boldsymbol{B} is \mathbf{3} \times \mathbf{3} and matrix \boldsymbol{A} is \mathbf{3} \times \mathbf{3}.
Thus the multiplications we can proceed as
(i) The multiplication A \boldsymbol{B} is possible.
A B=\left(\begin{array}{ccc} 1 & 3 & -1 \\ 2 & 2 & -1 \\ 3 & 0 & -1 \end{array}\right)\left(\begin{array}{rrr} -2 & 3 & -1 \\ -1 & 2 & -1 \\ -6 & 9 & -4 \end{array}\right)=\left(\begin{array}{lll} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array}\right)
(ii) The multiplication \boldsymbol{B A} is possible.
B A=\left(\begin{array}{lll} -2 & 3 & -1 \\ -1 & 2 & -1 \\ -6 & 9 & -4 \end{array}\right)\left(\begin{array}{lll} 1 & 3 & -1 \\ 2 & 2 & -1 \\ 3 & 0 & -1 \end{array}\right)=\left(\begin{array}{lll} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array}\right)
From (i) and (ii) it can be observed that both the matrices A B and B A are of same order 3 \times 3 and the corresponding elements are same. Therefore by equality of two matrices we can say here that our matrices are equal.
Hence \boldsymbol{A B}=\boldsymbol{B A}.