Let $A,B$ be $n\times n$ matrices with complex elements, $AB=BA$, $\det(B)\ne0$, having the following property: $$|\det(A+zB)|=1, \forall z \in \mathbb{C}, |z|=1.$$ Prove $A^n=0_n$. Does this remain true if $AB \ne BA$?
So far, no idea. Any help is appreciated.
Update
I think I made some progress:
Let $f(z)=\det(A+zB)=a_nz^n + .. + a_0$
From $|f(z)|=1$ we have $f(z)\overline {f(z)}=1, \forall z, |z|=1$ then, after replacing $\overline z$ with $\frac 1 z$:
$(a_nz^n + .. + a_0)(\overline a_0z^n + .. + \overline a_n)=z^n \tag 1$
Because (1) is true for infinitely many $z$ then (1) must be a polynomial identity. Identifying coefficients I've got
$$a_0=a_1=..a_{n-1}=0, a_n\overline a_n=1$$
So $\det(A+zB)=a_nz^n$ where $|a_n|=1$. It follows that $det(A)=0, det(B)=a_n$.