Let $A_{4,1}$ be a Lie algebra of dimension four such that non-vanishing Lie brackets on $A_{4,1}$ are given by $$[e_2,\, e_4]= e_1, \: [e_3,\, e_4]= e_2.$$ Furthermore, we observe that the Lie algebra $A_{4,1}$ is a three step nilpotent Lie algebra and it admit a three dimensional abelian ideal $\mathfrak{n}$ generated by $\{e_1,\, e_2, e_3\}$ which can be presented as follows $$\mathfrak{n}\simeq\displaystyle\left\{ \begin{pmatrix} x & 0 & 0 \\ 0 & y & 0 \\ 0 & 0 & z \end{pmatrix}, x,\,y,\,z,\,\in \mathbb{R}\displaystyle\right\}.$$ Next, we consider the Lie subalgebra $\mathfrak{h}:=< e_4>$ and thus $\mathfrak{n} \cap \mathfrak{h}=\{0\}$. Therefore the Lie algebra is isomorphic to the semi-direct product $\mathfrak{n} \rtimes_{\varphi} \mathfrak{h}$ with respect to the map \begin{eqnarray*} \varphi \; : \mathfrak{h} &\longrightarrow & \mbox{der}(\mathfrak{n}) \\ e_{4} & \longmapsto & \varphi(e_4) \end{eqnarray*} such that \begin{eqnarray*} \varphi(e_4)(e_1) &=& ad_{e_4}(e_1)=0,\qquad \varphi(e_4)(e_2) = ad_{e_4}(e_2)=-e_{1}\\ \varphi(e_4)(e_3) &=& ad_{e_4}(e_3)=-e_2. \end{eqnarray*} This implies that $\varphi(te_4)=\begin{pmatrix} 0 & -t & 0 \\ 0 & 0 & -t\\ 0 & 0 & 0 \end{pmatrix}$ for some $t \in \mathbb{R}$.

My question is how to express an element in $\mathfrak{n} \rtimes_{\varphi} \mathfrak{h}$ by using matrix. More precisely, if we have a pair of elements $(A,t) \in \mathfrak{n} \rtimes_{\varphi} \mathfrak{h}$ where $A$ is a matrix in $\mathfrak{n}$ which has the form $$\begin{pmatrix} x & 0 & 0 \\ 0 & y & 0\\ 0 & 0 & z \end{pmatrix}$$ for some $x,\,y,\,z \in \mathbb{R}$. How can i represent $(A,t) \in \mathfrak{n} \rtimes_{\varphi} \mathfrak{h}$ as a matrix and how can i express the exponential function $ \exp : \mathfrak{n} \rtimes_{\varphi} \mathfrak{h} \to \mathit{N} \rtimes_{\phi} \mathfrak{h}$ where $Lie (\mathit{N} )= \mathfrak{n}$ and $Lie(\varphi)=\phi$.

I really need the answer of these questions, and i need of your remaks. Thank you!