Problem 7.21: Prove that the following cases are not group isomorphic (Hint: center of isomorphic groups are also isomorphic).
(a) $O(n)\not \cong SO(n)\times O(1)$ as $n$ is even, if $n$ is odd the isomorphism exists.
(b) $U(n)\not \cong SU(n)\times U(1)$ as $n>1$, if $n=1$ the isomorphism exists.
(c) $GL(n,\mathbb{R})\not \cong SL(n,\mathbb{R})\times \mathbb{R}^{*}$, same situation as case (a) (i.e. there is not a isomorphism if $n$ is even, otherwise we can find it).
(d) $GL(n,\mathbb{C})\not \cong SL(n,\mathbb{C})\times\mathbb{C}^{*}$, same situation as case (b).
Here, $\times$ means direct product of groups.
I've been trying to solve problem 7.21 of Introduction to manifolds by Lee. As the hint points out, if $H,G$ are group isomorphic then their centers are also group isomorphic.
Then, let's try case b), here $G=U(n)$ and $H=SU(n)\times U(1)$,$$Z(U(n))\cong S^1$$and$$Z(SU(n)\times U(1))=Z(SU(n))\times Z(U(1))\cong Z_n\times S^1.$$So, in order to prove that there is no such a group isomorphism as $n>1$. I must prove the nonexistence of a group isomorphism $S^1\to Z_n \times S^1$, but I cannot see a way to prove it.
It seems like you have exactly the right idea, but you're making your life too hard at the very end!
Let's focus on (b), as you did in your question.
Towards a contradiction, say that $U(n) \cong SU(n) \times U(1)$. Then, following the hint, their centers would need to be isomorphic. Indeed, they should be isomorphic as lie groups. But, as you've noticed, the center of $U(n)$ is isomorphic to $U(1)$ and the center of $SU(n) \times U(1)$ is isomorphic to $\mathbb{Z}/n \times U(1)$.
So then we should have $U(1) \cong \mathbb{Z}/n \times U(1)$. Of course, this is obviously false when $n > 1$ (for instance, $U(1)$ is connected while $\mathbb{Z}/n \times U(1)$ is not). When $n=1$, then $\mathbb{Z}/n$ is the trivial group, and indeed $U(1) \cong U(1)$ is true!
(As an aside, if you want a purely algebraic proof that $U(1) \not \cong \mathbb{Z}/n \times U(1)$, you should count the number of elements of order $n$ in each group. In $U(1)$ there's one such element for each primitive $n$th root of unity, and in $\mathbb{Z}/n \times U(1)$ there's many more than that).
Now knowing that it's enough to check that the centers aren't isomorphic (and keeping in mind this trick of checking the number of connected components) can you see how to do parts (a), (c), and (d)?
I hope this helps ^_^