Proof. Let $z_{k}=x_{k}+i y_{k}$ for $k=1,2,3 .$ Then

$$

\begin{aligned}

\left(z_{1} z_{2}\right) z_{3}=&\left(\left(x_{1}+y_{1} i\right)\left(x_{2}+y_{2} i\right)\right)\left(x_{3}+y_{3} i\right) \\

=&\left(\left(x_{1} x_{2}-y_{1} y_{2}\right)+i\left(x_{2} y_{1}+x_{1} y_{2}\right)\right)\left(x_{3}+y_{3} i\right) \\

=&\left(x_{1} x_{2} x_{3}-x_{3} y_{1} y_{2}-x_{2} y_{1} y_{3}-x_{1} y_{2} y_{3}\right) \\

&+i\left(x_{2} x_{3} y_{1}+x_{1} x_{3} y_{2}+x_{1} x_{2} y_{3}-y_{1} y_{2} y_{3}\right)

\end{aligned}

$$

and

$$

\begin{aligned}

z_{1}\left(z_{2} z_{3}\right)=&\left.\left(x_{1}+y_{1} i\right)\left(\left(x_{2}+y_{2} i\right)\right)\left(x_{3}+y_{3} i\right)\right) \\

=&\left(x_{1}+y_{1} i\right)\left(\left(x_{2} x_{3}-y_{2} y_{3}\right)+i\left(x_{2} y_{3}+x_{3} y_{2}\right)\right) \\

=&\left(x_{1} x_{2} x_{3}-x_{3} y_{1} y_{2}-x_{2} y_{1} y_{3}-x_{1} y_{2} y_{3}\right) \\

&+i\left(x_{2} x_{3} y_{1}+x_{1} x_{3} y_{2}+x_{1} x_{2} y_{3}-y_{1} y_{2} y_{3}\right)

\end{aligned}

$$

Therefore,

$$

\left(z_{1} z_{2}\right) z_{3}=z_{1}\left(z_{2} z_{3}\right)

$$