\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\un}{\underline}
\parindent=0pt
\begin{document}

{\bf Question}

Find $(AB)C$ and $A(BC)$ where

$$A=\left(\begin{array}{cc} -5 & 1\\ 9 & -1 \end{array}\right);\ \
B=\left(\begin{array}{cc} 1 & 2\\ 3 & 2 \end{array}\right);\ \
C=\left(\begin{array}{cc} 1 & 0\\ -1 & 1 \end{array}\right)$$

\medskip

{\bf Answer}

$(AB)=\left(\begin{array}{cc} -5 & 1\\9 & -1
\end{array}\right)\left(\begin{array}{cc} 1 & 2\\3 & 2
\end{array}\right)=\left(\begin{array}{cc} -2 & -8\\6 & 16
\end{array}\right)$

$(AB)C=\left(\begin{array}{cc} -2 & -8\\6 & 16
\end{array}\right)\left(\begin{array}{cc} 1 & 0\\-1 & 1
\end{array}\right)=\left(\begin{array}{cc} 6 & -8\\-10 & 16
\end{array}\right)$

NB note order

$A(BC)$ should be the same, but let's check anyway.

$(BC)=\left(\begin{array}{cc} 1 & 2\\3 & 2
\end{array}\right)\left(\begin{array}{cc} 1 & 0\\-1 & 1
\end{array}\right)=\left(\begin{array}{cc} -1 & 2\\1 & 2
\end{array}\right)$

$A(BC)=\left(\begin{array}{cc} -5 & 1\\9 & -1
\end{array}\right)\left(\begin{array}{cc} -1 & 2\\1 & 2
\end{array}\right)=\left(\begin{array}{cc} 6 & -8\\-10 & 16
\end{array}\right)$

So $(AB)C=A(BC)$

\end{document}
