Solution (source code)

= Solution

Take curves $g(s),h(t)$ through the identity with tangent vectors $X,Y$. Form the local group <commutator> $c(s,t)=g(s)h(t)g(s)^{-1}h(t)^{-1}$. In a smooth coordinate chart at the identity, its leading mixed term defines the <Lie bracket>:
$$
[X,Y]=\partial_s\partial_t c(s,t)\big|_{s=t=0}
$$
for a matrix group, where the identity's constant term has zero derivative. More generally take this derivative in the chart with the identity sent to zero. Since the first derivatives vanish on the coordinate axes, changing charts changes the mixed coefficient only by the tangent-space coordinate transformation, so the definition is intrinsic.

For the displayed nilpotent matrices choose $g(s)=I+sX$ and $h(t)=I+tY$, which lie in $\mathrm{SL}_2$. Their inverses are $I-sX$ and $I-tY$. Direct multiplication gives
$$
g(s)h(t)g(s)^{-1}h(t)^{-1}
=\begin{pmatrix}1+st+s^2t^2&-s^2t\\st^2&1-st\end{pmatrix}.
$$
Its mixed derivative is therefore
$$
\boxed{[X,Y]=\begin{pmatrix}1&0\\0&-1\end{pmatrix}=H.}
$$
Interchanging the two curves gives
$$
h(t)g(s)h(t)^{-1}g(s)^{-1}
=\begin{pmatrix}1-st&s^2t\\-st^2&1+st+s^2t^2\end{pmatrix},
$$
whose mixed derivative is $-H$. Thus \b[$[X,Y]=-[Y,X]$] directly from the curve definition. The general matrix expansion likewise gives the <commutator> $XY-YX$.