If A = \(\begin{pmatrix}3 & 2 & 1\\4 & 2 & -1\end{pmatrix}\) and B =…