$SU(n)$ denotes the special unitary group. I know its dimension should be $n^2-1$. However, I am trying to prove it and get a wrong result. I have no idea what is wrong with my proof. Therefore, I am wondering if someone could point the mistake out. Thank you! The following is my proof.
I consder the determinant function $\det:U(n)\to\mathbb{C}$, where $U(n)$ denotes the unitary group. $\det$ should be a Lie group homomorphism. Hence, it is a smooth map with constant rank. Then, $SU(n)=\det^{-1}(1)$, which actually shows that $SU(n)$ is an embedded Lie subgroup of $U(n)$.
I have already known that $U(n)$ is $n^2$-dimensional. It suffices to figure out the rank of $\det$, since the codimension of $SU(n)$ is the rank of $\det$.
It suffices to check the rank at $I_n$ which denotes the identity matrix, since $\det$ has a constant rank. Pick $B\in T_{I_n}U(n)=M(n,\mathbb{C})$, where $M(n,\mathbb{C})$ denotes the set of all matrices whose entries are complex.
Therefore, the differential of $\det$ is a map $d(\det)_{I_n}:M(n,\mathbb{c})\to\mathbb{C}$. Consider the curve $$\gamma(t)=I_n+tB$$. Clearly, $\gamma'(0)=B$, $\gamma(0)=I_n$.
Then, I compute \begin{align*} d(\det)_{I_n}(B) &=(\det\circ\gamma)'(0)\\ &=\frac{d}{dt}|_{t=0}\det(I_n+tB)\\ &=tr(B) \end{align*}
Now, I think I can prove the image of $d(\det)_{I_n}$ is $\mathbb{C}$, since given any $c\in\mathbb{C}$ I take the matrix $B$ as $\frac{c}{n}I_n$.
Therefore, I believe that the rank of $\det$ is 2, which is the dimension of $\mathbb{C}$. So I conclude that the dimension of $SU(n)$ is $n^2-2$.
I know I must make a silly mistake. Could someone point it out? Thank you very much!