I need to construct real-valued matrices with specific complex eigenvalues. I have seen the companion matrix, which sort of does my job, but there are some other desirable properties as well, so I'm looking for a more general construction. If anyone could shed some light, that'd be awesome.
The eigenvalues will be distinct. They will lie on the unit circle. Preferably, I could choose the eigenvectors as well (I know some restrictions will apply, but it's fine). It would be amazing, if the matrix had as few zeros as possible.
So, given I am asking for a lot, I will appreciate the most general construction.
I have seen this answer (https://math.stackexchange.com/q/1345699), but I wonder if there is a method that provides greater freedom over the matrix.
Build $M$ with $2 \times 2$ block matrices along the diagonal as in the linked question. Then for any invertible matrix $A$ the matrix $AMA^{-1}$ will have the eigenvalues you want. You can design $A$ to get the other properties you care about.
The original $M$ is likely to be the one with the most zeroes.
A random square matrix $A$ will be invertible (the probability that the determinant is $0$ is $0$) and I'm pretty sure $AMA^{-1}$ will have no $0$ entries with probability $1$.