The sizes of two matrices A and B are given. Find the size of the product AB and the product BA, whenever these products exits.

A is 5 × 6, and B is 2 × 5.

**Solution:-**

Find the number of rows and number of columns in A. In an m × n matrix, m represents the number of rows and n represents the number of columns.

In matrix A, the number of rows and number of columns is 6.

Find the number of rows and number of columns in B.

In matrix B, the number of rows is 2 and the number of columns is 5.

The product AB of two matrices A and B can be found only if the number of columns of A is the same as the number of rows of B.

Note that the number of columns is A is 6 and the number of rows in matrix B is 6, which are not the same.

Thus, the product AB cannot be found.

Similarly, the product BA of two matrices B and A can be found only if the number of columns of B is the same as the number of rows of A.

Note that the number of columns in matrix B and the number of rows in matrix A is 5.

Thus , the product BA can be found.

Note that the product BA will have as many rows as B and as many columns as A.

Determine the size of the product BA. Note that B has 2 rows and A has 6 columns.

The size of the product BA is 2 × 6.