Solution (source code)

= Solution

An <elementary matrix> acts on rows by multiplication on the left. Apply the desired <elementary row operation> to the <identity matrix> to construct it. In the order requested, the three <elementary matrices> and their <inverse matrices> are
$$
\boxed{E_1=\begin{pmatrix}2&0&0\\0&1&0\\0&0&1\end{pmatrix},\quad E_1^{-1}=\begin{pmatrix}1/2&0&0\\0&1&0\\0&0&1\end{pmatrix};}
$$
$$
\boxed{E_2=\begin{pmatrix}1&0&0\\0&1&0\\-2&0&1\end{pmatrix},\quad E_2^{-1}=\begin{pmatrix}1&0&0\\0&1&0\\2&0&1\end{pmatrix};}
$$
$$
\boxed{E_3=\begin{pmatrix}1&0&0\\0&0&1\\0&1&0\end{pmatrix},\quad E_3^{-1}=E_3.}
$$
The inverse operations halve row 1, add twice row 1 to row 3, and interchange rows 2 and 3 again, respectively.