Metric over a Lie algebra $\mathfrak{u}(n)$ Let $\mathfrak{u}(n)$ be the Lie algebra of the Lie group $U(n)$. I can define a positive-definite inner product over $\mathfrak{u}(n)$ in this way: if $A,B \in \mathfrak{u}(n)$ I define $\langle A,B \rangle := \Re(\operatorname{Tr}(AB^*))$, where by $\Re$ I denote the real part and by $B^*$ the conjugate transpose of $B$. Why does this inner product over $\mathfrak{u}(n)$ define the unique left-invariant metric on the Lie group $U(n)$?
Let $A$ and $B$ be complex $n \times n$ matrices with respective $(j, k)$ entries $A_{jk}$ and $B_{jk}$, and note that $B^*$ (the conjugate transpose) has $(j, k)$ entry $\bar{B}_{kj}$. By definition,
$$
\langle A, B\rangle
  = \Re\bigl(\text{Tr}(AB^*)\bigr)
  = \Re \sum_{j,k=1}^n A_{jk} \bar{B}_{jk},$$
which is precisely the Euclidean inner product of $A$ and $B$ if these matrices are identified with complex vectors in $\mathbf{C}^{n^2}$. The resulting pairing on $\mathfrak{u}(n)$ is the restriction of this inner product.

Generally, if $G$ is a Lie group and $g \in G$, then the left multiplication map $\ell_g:G \to G$ is a diffeomorphism sending $e$ to $g$, so the push-forward $(\ell_g)_*:\mathfrak{g} \to T_gG$ is an isomorphism of vector spaces. An inner product on $\mathfrak{g}$ thereby determines an inner product on each tangent space $T_gG$, and since multiplication is smooth (as a function of $g$) these inner products constitute a Riemannian metric on $G$.

(In case it matters, this left-invariant metric is only "unique" in the sense that it is completely determined by the choice of inner product on $\mathfrak{g}$.)
Because Tr(AB*) is invariant under transformations of the orthogonal base of the algebra u(n). That's why define invariant metric on group U(n) and is left because B are tensors and must respect the sequence of &lt; A,B >.