Suppose $A$ and $B$ are invertible $n\times n$ matrix such that $AB=cBA$ where $c\in\mathbb{C}$. Show that $c^n=1$.
I have tried this question from different angles. $n=1$ is obvious. But even for $n=2$, I am not able to show this, even after multiplying, squaring the equations etc.
$$AB=cBA\implies \det(AB)=c^n\det(BA)\implies c^n=1.$$