# Determine all 2 times 2 matrices A such that AB = BA for any 2 times 2 matrix B.

Question
Matrices
Determine all $$2 \times 2$$ matrices A such that AB = BA for any $$2 \times 2$$ matrix B.

2021-03-05
Step 1
Let $$A=\begin{bmatrix}a & b \\c & d \end{bmatrix} \text{ and } B=\begin{bmatrix}p & q \\ r & s \end{bmatrix}$$ be any $$2 \times 2$$ matrices.
Step 5
Find AB.
$$AB=\begin{bmatrix}a & b \\c & d \end{bmatrix}\begin{bmatrix}p & q \\ r & s \end{bmatrix}$$
$$=\begin{bmatrix}ap+br & aq+bs \\ cp+dr & cq+ds \end{bmatrix}$$
Find BA.
$$BA=\begin{bmatrix}p & q \\ r & s \end{bmatrix}\begin{bmatrix}a & b \\c & d \end{bmatrix}$$
$$=\begin{bmatrix}ap+cq & bp+dq \\ ar+cs & br+ds \end{bmatrix}$$ Equate the matrices AB=BA.
AB=BA
$$\begin{bmatrix}ap+br & aq+bs \\ cp+dr & cq+ds \end{bmatrix}=\begin{bmatrix}ap+cq & bp+dq \\ ar+cs & br+ds \end{bmatrix}$$
$$\begin{bmatrix}ap+br & aq+bs \\ cp+dr & cq+ds \end{bmatrix}-\begin{bmatrix}ap+cq & bp+dq \\ ar+cs & br+ds \end{bmatrix}= \begin{bmatrix}0 & 0 \\0 & 0\end{bmatrix}$$
$$\begin{bmatrix}br-cq & (a-d)q-b(p-s) \\ c(p-s)-r(a-d) & cq-br \end{bmatrix}=\begin{bmatrix}0 & 0 \\0 & 0\end{bmatrix}$$
Equate the matrices.
$$br-cq=0 \dots (1)$$
$$(a-d)q-b(p-s)=0 \dots (2)$$
$$c(p-s)-r(a-d)=0 \dots (3)$$
$$cq-br=0 \dots(4)$$
From equation (1) and equation (4),
$$q=\frac{b}{c}r$$
Substitute $$q=\frac{b}{c}r$$ in equation (2)
$$(a-d)\frac{b}{c}e-b(p-s)=0$$
$$c= \frac{(a-d)r}{(p-s)}$$
Substitute $$q=\frac{b}{c}r$$ in equation (2)
$$(a-d)(\frac{b}{c}r)-b(p-s)=0$$
$$b=\frac{q(a-d)}{p-s}$$
Hence, the 2x2 matrix which satisfied AB=BA for any matrix B is
$$A=\begin{bmatrix}a & \frac{q(a-d)}{p-s} \\ \frac{r(a-d)}{p-s} & d \end{bmatrix}$$

### Relevant Questions

In the following question there are statements which are TRUE and statements which are FALSE.
Choose all the statements which are FALSE.
1. If the number of equations in a linear system exceeds the number of unknowns, then the system must be inconsistent - thus no solution.
2. If B has a column with zeros, then AB will also have a column with zeros, if this product is defined.
3. If AB + BA is defined, then A and B are square matrices of the same size/dimension/order.
4. Suppose A is an n x n matrix and assume A^2 = O, where O is the zero matrix. Then A = O.
5. If A and B are n x n matrices such that AB = I, then BA = I, where I is the identity matrix.
If $$A=\begin{bmatrix}-2 & 1&-4 \\-2 & 4&-1 \\ 1 &-1 &-4 \end{bmatrix} \text{ and } B=\begin{bmatrix}-2 & 4&2 \\-4 & -1&1 \\ 4 &1 &1 \end{bmatrix}$$
then AB=?
BA=?
True or false : AB=BA for any two square matrices A and B of the same size.
Let A and B be $$n \times n$$ matrices. Recall that the trace of A , written tr(A),equal
$$\sum_{i=1}^nA_{ii}$$
Prove that tr(AB)=tr(BA) and $$tr(A)=tr(A^t)$$
Given matrix A and matrix B. Find (if possible) the matrices: (a) AB (b) BA.
$$A=\begin{bmatrix}3 & -2 \\1 & 5\end{bmatrix} , B=\begin{bmatrix}0 & 0 \\5 & -6 \end{bmatrix}$$
Given matrix A and matrix B. Find (if possible) the matrices: (a) AB (b) BA.
A=\begin{bmatrix}-1 \\-2\\-3 \end{bmatrix} , B=\begin{bmatrix}1 & 2 & 3 \end{bmatrix}
Given matrix A and matrix B. Find (if possible) the matrices: (a) AB (b) BA. $$A=\begin{bmatrix}1 & 2 &3&4\end{bmatrix} , B=\begin{bmatrix}1 \\ 2 \\ 3 \\ 4 \end{bmatrix}$$
Prove: If A and B are $$n \times n$$ diagonal matrices, then
$$A=\begin{bmatrix}1 & -1 &1\\5&0&-2\\3&-2&2\end{bmatrix} , B=\begin{bmatrix}1 & 1 &0\\1&-4&5\\3&-1&2\end{bmatrix}$$
$$A=\begin{bmatrix}2 & 0 \\0 & -3 \end{bmatrix} , B=\begin{bmatrix}-5 & 0 \\0 & 4 \end{bmatrix}$$
$$\begin{bmatrix}1 & 4&3 \\0 & 1&4\\0&0&2 \end{bmatrix}\begin{bmatrix}3 & 2 \\1 & 1\\4&5 \end{bmatrix}$$