Classifying left invariant metrics on the 3-dimensional heisenberg group Recently I read that all left invariant metrics on the Heisenberg group are equivalent up to scaling,however no reference was given for this result. I've made some attempt to prove this myself. In particular the Heisenberg group H can be represented as, $$H=\left\{ \begin{bmatrix}1&x&y\\0&1&z\\0&0&1 \end{bmatrix} \Big\vert\, x,y,z\in\mathbb{R}\right\}\tag{1}$$with $$\mathfrak{g}=\left\{\begin{bmatrix}0&x&y\\0&0&z&\\0&0&0\end{bmatrix}\Big| \,x,y,z\in\mathbb{R}\right\}\tag{2}$$its associated Lie algebra. Then we can define a left invariant metric $g$ by choosing a basis for $\mathfrak{g}$ and declaring it orthonormal and then translating. I've made a attempts at this but am not really sure where to start. I've tried starting with two choices of basis $\{E_1,E_2,E_3\}$ and $\{F_1,F_2,F_3\}$ with metrics $g_1,g_2$ respectively. I like to then say that if $\phi:\mathfrak{g}\rightarrow\mathfrak{g}$ is an automorphism I could extend that to an automorphism $\Phi:H\rightarrow H$ which will hopefully be an isometry. If you can point me in the right direction with either a reference or on the proof itself I would appreciate it. 
 A: There are essentially two approaches to this problem, both of which will arrive at identical results.  One relies on results pertaining to three-dimensional unimodular Lie groups that can be found in John Milnor's wonderful paper concerning the left invariant Riemannian metrics on Lie groups.  The other approach is to directly exploit the automorphisms of the Lie algebra of the Heisenberg group.  Since the Heisenberg group is nilpotent and the bracket structure is incredibly simple, the automorphism group is large and one can find a basis for an arbitrary left invariant metric that is of a particularly simple form.  Using the automorphism group to find canonical forms for left invariant metrics on three-dimensional Lie groups has its limitations, however, as almost nothing can be said about the canonical forms of left invariant metrics on $SO(3)$ and $SL_{2}\left(\mathbb{R}\right)$ via an automorphism reduction.  In these cases, the results of Milnor are truly wonderful.
I will outline both approaches below and I have provided a link to Milnor's paper at the end of this answer.

(Automorphism Reduction) Using your notation above, we take the following as a basis for the Lie algebra $\mathfrak{g}$:
$$
\mathbf{E}_{1} = \begin{pmatrix} 0&1&0\\ 0&0&0\\ 0&0&0\\\end{pmatrix}, \hskip.25in
\mathbf{E}_{2} =\begin{pmatrix} 0&0&0\\ 0&0&1\\ 0&0&0\\\end{pmatrix}
\hskip.25in
\mathbf{E}_{3} = \begin{pmatrix} 0&0&1\\ 0&0&0\\ 0&0&0\\\end{pmatrix},
$$
and we observe that the Lie algebra structure of $\mathfrak{g}$ is completely determined by the non-zero bracket relations
$$
\left[ \mathbf{E}_{1}, \mathbf{E}_{2}\right] = \mathbf{E}_{3}.
$$
The corresponding  structure constants $C_{ij}^{k}$ are defined by $\left[\mathbf{E}_{i}, \mathbf{E}_{j}\right] = C_{ij}^{k}\mathbf{E}_{k}$ (summation convention assumed), and we note that the only nonzero structure constant(s) is $C_{12}^{3} = 1$ (and $C_{21}^{3} = -1$).
Due to the number of structure constants of the Lie algebra that are zero, the group of automorphisms is quite large.   We can take as the definition of an automorphism of $\mathfrak{g}$ to be an invertible linear transformation $A : \mathfrak{g} \to \mathfrak{g}$ that satisfies $A\left(\left[\mathbf{E}_{i}, \mathbf{E}_{j}\right]\right) = \left[ A\left(\mathbf{E}_{i}\right), A\left(\mathbf{E}_{j}\right)\right]$ for all basis vectors $\mathbf{E}_{i}$, $\mathbf{E}_{j}$.
Letting $A : \mathfrak{g} \to \mathfrak{g}$ be a linear transformation defined with respect to the given basis by $A\left(\mathbf{E}_{i}\right) = a_{i}^{j}\mathbf{E}_{j}$, we find that the entries of the matrix representation of $A$ must relate to the structure constants of $\mathfrak{g}$ as follows.
Computing the Lie brackets of the basis vectors first, we must have
\begin{align*}
A\left(\left[\mathbf{E}_{i}, \mathbf{E}_{j}\right]\right) &= A\left(C_{ij}^{k}\mathbf{E}_{k}\right)\\
&= C_{ij}^{k}A\left(\mathbf{E}_{k}\right)\\
&= C_{ij}^{k}a_{k}^{p}\mathbf{E}_{p}.
\end{align*}
But calculating the Lie bracket $\left[A\left(\mathbf{E}_{i}\right), A\left(\mathbf{E}_{j}\right)\right]$ after mapping, we find that
\begin{align*}
\left[A\left(\mathbf{E}_{i}\right), A\left(\mathbf{E}_{j}\right)\right] &= \left[a_{i}^{r}\mathbf{E}_{r}, a_{j}^{s}\mathbf{E}_{s}\right]\\
&= a_{i}^{r}a_{j}^{s}\left[\mathbf{E}_{r}, \mathbf{E}_{s}\right]\\
&= a_{ij}^{r}a_{j}^{s}C_{rs}^{p}\mathbf{E}_{p}.
\end{align*}
Thus, the entries of the matrix representation of $A$ and the structure constants $C_{ij}^{k}$ must satisfy the following system of equations:
$$
C_{ij}^{k}a_{k}^{p} = a_{ij}^{r}a_{j}^{s}C_{rs}^{p}, \hskip.15in i, j, k, r, s, p = 1..3.
$$
Again, due to the number of structure constants that are zero, the equations above are easily solved ad one finds that $A = \left(a^{i}_{j}\right)$ is an automorphism of $\mathfrak{g}$ if and only if $A$ has a matrix representation with respect to the chosen basis of the form
$$
A= \begin{pmatrix}
a^{1}_{1} & a^{1}_{2} & 0\\
a^{2}_{1} & a^{2}_{2} & 0\\
a^{3}_{1} & a^{3}_{2} & \Delta
\end{pmatrix},
\hskip.25in \Delta =a^{1}_{1}a^{2}_{2} - a^{1}_{2}a^{2}_{1}  \ne 0.
$$
Now, if we start with an arbitrary left invariant metric $\mathbf{g}$ defined relative to the chosen frame $\mathbf{E}_{1}, \mathbf{E}_{2}, \mathbf{E}_{3}$ by
$$
\mathbf{g} = \left(g_{ij}\right) = \left(\mathbf{g}\left(\mathbf{E}_{i}, \mathbf{E}_{j}\right)\right),
$$
we can use elements of the automorphism group to change the basis of $\mathfrak{g}$ so that


*

*The matrix representation $\mathbf{g} = \left(g_{ij}\right) = \left(\mathbf{g}\left(\mathbf{E}_{i}, \mathbf{E}_{j}\right)\right)$ of the inner product is as simple as possible, and

*The structure constants of the new basis remain fixed.


Note that as opposed to starting with an arbitrary frame for the Lie algebra and declaring it to be an orthonormal frame that we turn into a left invariant metric $\mathbf{g}$ via left translation, we instead start with a particular frame for the Lie algebra $\mathfrak{g}$ and we let $\mathbf{g}$ be an arbitrary inner product that we turn into a left invariant metric via left translations.  The distinction here is essential.
Observing that the columns of the matrix representation of an element in the automorphism group tell us exactly what we can do to a particular basis vector with an automorphism, we see that can arrange for the basis vectors $\mathbf{E}_{1}$ and $\mathbf{E}_{2}$ to be any two linearly independent vectors that are also linearly independent to $\mathbf{E}_{3}$.
Specifically, we can make a change of basis of the form
\begin{align*}
\tilde{\mathbf{E}}_{1} &= a^{1}_{1}\mathbf{E}_{1} + a^{2}_{1}\mathbf{E}_{2} + a^{3}_{1}\mathbf{E}_{3}\\
\tilde{\mathbf{E}}_{2} &= a^{1}_{2}\mathbf{E}_{1} + a^{2}_{2}\mathbf{E}_{2} + a^{3}_{2}\mathbf{E}_{3}\\
\tilde{\mathbf{E}}_{1} &= \Delta\mathbf{E}_{3},\\
\end{align*}
so that that $\tilde{\mathbf{E}}_{1}$ and $\tilde{\mathbf{E}_{2}}$ are $\mathbf{g}$-orthogonal unit vectors that are $\mathbf{g}$-orthogonal to $\mathbf{E}_{3}$.
Furthermore, note that a change of basis of the indicated form will only scale $\mathbf{E}_{3}$.
The matrix representation of the inner product $\mathbf{g}$ with respect to the new basis takes the form
$$
\mathbf{g} = \left(g_{ij}\right) = \left(\mathbf{g}\left(\tilde{\mathbf{E}}_{i}, \tilde{\mathbf{E}}_{j}\right)\right)
=
\begin{pmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & \mathbf{g}\left(\tilde{\mathbf{E}}_{3}, \tilde{\mathbf{E}}_{3}\right)\\
\end{pmatrix}.
$$
Note that the selection of the basis vectors $\tilde{\mathbf{E}}_{1}$ and $\tilde{\mathbf{E}}_{2}$ to be orthogonal unit vectors that are orthogonal to $\mathbf{E}_{3}$ is unique up to a rotation about $\mathbf{E}_{3}$, i.e., an automorphism of the form $\begin{pmatrix} \cos \theta & -\sin \theta & 0\\
\sin \theta & \cos \theta & 0\\
0 & 0& 1\\
\end{pmatrix}$, but applying such an automorphism will do nothing to improve the representation of the left invariant metric $\mathbf{g}$.
Finally, as you noted in your question, we can extend the automorphism of the Lie algebra $\mathfrak{g}$ to an automorphism of the Heisenberg group $H$. As such, we see that the left invariant metrics on the Heisenberg group are of the form
$$
\mathbf{g} = \left(g_{ij}\right) = \left(\mathbf{g}\left(\mathbf{E}_{i}, \mathbf{E}_{j}\right)\right)
=
\begin{pmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & \mathbf{g}\left(\mathbf{E}_{3}, \mathbf{E}_{3}\right)\\
\end{pmatrix},
$$
where the Lie algebra structure of $\mathfrak{g}$ is determined by the non-zero bracket $\left[\mathbf{E}_{1}, \mathbf{E}_{2}\right] = \mathbf{E}_{3}$.
Or equivalently
$$
\mathbf{g} = \omega^{1} \otimes \omega^{1} + \omega^{2}\otimes \omega^{2} + \lambda \omega^{3} \otimes \omega^{3},\hskip.25in \lambda \in \mathbb{R}, \lambda > 0
$$
where $\omega^{1}, \omega^{2}, \omega^{3}$ constitute the coframe that is dual to $\mathbf{E}_1, \mathbf{E}_{2}$, $\mathbf{E}_{3}$.
Milnor's Approach (I will supply some details later tonight, but you can find the article linked here:  Curvatures of left invariant metrics on Lie groups.  The relevant material is in Section 4.  If you try using the automorphisms of $SO(3)$ or $SL_{2}\left(\mathbb{R}\right)$  to reduce the left invariant metrics on either of the groups to somewhat canonical forms, you will gain an appreciation for how wonderful Milnor's result(s) is(are).  The abstract of the paper also happens to be one of my favorite abstracts.)
