Solution (source code)

= Solution
{c}

Parametrize the <matrices> by
$$
h(a,b,c)=\begin{pmatrix}1&a&b\\0&1&c\\0&0&1\end{pmatrix},
\qquad a,b,c\in\mathbb Z_3.
$$
Direct <matrix multiplication> gives
$$
h(a,b,c)h(a',b',c')
=h(a+a',\ b+b'+ac',\ c+c').
$$
This proves closure. The <identity matrix> is $h(0,0,0)$, and the formula
$$
\boxed{h(a,b,c)^{-1}=h(-a,\ ac-b,\ -c)}
$$
gives both a left and a right inverse, as substitution in the product formula verifies. Thus each element is an <invertible matrix>, and the <subgroup test> shows that $H$ is a <subgroup> of $\operatorname{GL}_3(\mathbb Z_3)$. It is the <unitriangular group> $\operatorname{UT}_3(\mathbb F_3)$ and has $3^3=27$ elements.