How do I embed p-groups into the group of upper uni-triangular matrices? $U_n(\mathbb{F}_p)$ is the group of upper triangular matrices of order n with diagonal entries 1 and other entries from $\mathbb{F}_p$ (equipped with matrix multiplication). $$U_n = \left \{\left (  \begin{matrix}
1 &  &* \\ 
 & 1 & \\ 
 0&  & 1
\end{matrix}\right )_n : * \in \mathbb{F}_p \right \}$$
I need to show that given any p-group $G$, it is isomorphic to a subgroup of $U_n$ where $|G| = n$
One of the hints that I have been given is to see that there is an element in $\mathbb{F}_p^n$ which is stabilised by all elements of $G$ when they are viewed as members of $GL_n(\mathbb{F}_p)$. I have proved this but I do not know how to proceed from here.
 A: Let $\rho$ be the regular representation for the $p$-group $G$. We have that kernel of $\rho$ is trivial so $\rho$ is an injection of $G$ into $GL_n(p)$. Identify $G$ with its image. As $G$ is a $p$-subgroup of $GL_n(p)$, it is a subgroup of some Sylow $p$-subgroup of $GL_n(p)$. Note that $UT_n(p)$ is a Sylow $p$-subgroup of $GL_n(p)$ and all Sylow $p$-subgroups are conjugate, and so they are isomorphic. Therefore, we can identify $G$ with a subgroup of $UT_n(p)$.
A: I think the answer provided by Farid is a summary of the same arguments. I have tried to provide a much detailed explanation. We will prove the result with the following steps.

(1)  $\enspace |GL_n(p)|  = {\displaystyle \prod_{i = 0}^{n-1} (p^n - p^i) }$

By definition $GL_n(p)$ is the set of all non-singular $n \times n$ matrices over the field $\mathbb{F}_p$. It is sufficient to have a set of $n$ linearly independent row vectors, each of length $n$, to construct such a matrix. Without any restriction there are $p^n$ choices for a row vector, with $p$ choices for each element. Here, since we are constructing a non-singular matrix there are $p^n - 1$ choices for the first row after excluding the $\bar{0}$ vector. After the first one is chosen there are $p$ multiples (including $\bar{0})$ of this row which must not be chosen for the second row to maintain linear independence. Hence the second row has $p^n - p$ choices.
For the third row we will have to discard the $p$ multiples of both the first and the second row to ensure linear independence, and hence can be chosen in $(p^n - p^2)$ ways. Continuing likewise the last row must not be a multiple of the the first $n - 1$ rows and hence has $(p^n - p^{n-1})$ options. Now $(1)$ can be established using product rule for counting.

(2) $\enspace UT_n(p)$ is a Sylow-$p$ subgroup of  $GL_n(p)$.

$UT_n(p)$ is the group of upper triangular $n\times n$ matrices over $\mathbb{F}_p$ with $1$s in the diagonal. Since such matrices have determinant $1$ (the product of diagonals) we have $UT_n(p) \subset GL_n(p),$ and hence $UT_n(p) \leq GL_n(p)$. Now observe that for any such matrix fixing the diagonals as $1$s and the lower diagonal entries as $0$s leaves us $1 + 2 + \cdots + (n-1)= n(n-1)/2$ spaces to be filled by arbitrary elements. Since each element has $p$ choices we have,
$$|UT_n(p)| = p^{\frac{n(n-1)}{2}} $$
But also observe that,
\begin{align*}
    |GL_n(p)| = \prod_{i=0}^{n-1}(p^n - p^i) = \prod_{i=0}^{n-1} p^i\cdot (p^{n-i} - 1) = p^{\frac{n(n-1)}{2}}\cdot \prod_{i=0}^{n-1}(p^{n-i} - 1)
\end{align*}
But $p \nmid {\displaystyle \prod_{i=0}^{n-1}(p^{n-i} - 1)}$, hence a Sylow-$p$ subgroup of $GL_n(p)$ has order $p^{\frac{n(n-1)}{2}}.$

(3) $S_n$ can be embedded in $GL_n(p)$.

Consider $V,$ a vector space over $\mathbb{F}_p$ of dimension $n$. An automorphism of $V$ is an invertible map $f: V \rightarrow V$. We know that all such maps uniquely determine a non-singular matrix $T$ with entries from $\mathbb{F}_p$. Conversely, every such non-singular $T$ defines an invertible map $f: V\rightarrow V$. Moreover, composition of such maps represents multiplication of the corresponding matrices and the identity map corresponds to the identity matrix. Thus the immediate isomorphism $Aut(V) \cong GL_n(p)$ can be established.
Now fix $\{v_1,v_2,\cdots v_n\}$ as a basis of $V$. To define an automorphism of $V$ it is sufficient to specify the images of the basis vectors. Consider $\theta: S_n \rightarrow Aut(V)$,  $\sigma \mapsto f$, where $f(v_i) = v_{\sigma(i)}$; $f$ is an automorphism as the image of the basis set under $f$ is itself, and hence is linearly independent. Since every $\sigma$ induced permutation of the basis set define a distinct automorphism we have $\theta$ as a monomorphism, or $\theta$ is one-one. Therefore $S_n$ is embedded in $Aut(V)$ and hence in $GL_n(p).$

(4) Every finite $p$-group is embedded in a group of unitriangular matrices over $\mathbb{F}_p$.

Let $|G| = p^k$. By Cayley's theorem $G$ is embedded in a subgroup of $S_{p^k}$. By $(3)$, $S_{p^k}$ is embedded in $GL_{p^k}(p)$, hence, $G$ is isomorphic to a $p$-subgroup of $GL_{p^k}(p)$. But we have as a direct consequence of Sylow theorems that every $p$-subgroup of a group must be contained in one of its Sylow-$p$ subgroups. Therefore $G$ is embedded in some Sylow-$p$ subgroup $Q$ of $GL_n(p)$. But from $(2)$ and Sylow's theorems we have $Q$ and $UT_n(p)$ as conjugates, and hence isomorphic. So in conclusion, $G$ is embedded in $UT_n(p)$.
