[Math] Scaling a matrix to make its eigenvalues fall within a certain interval

eigenvalues-eigenvectorslinear algebramatrices

Suppose I have a diagonalizable matrix $M$ which has all its eigenvalues between $a$ and $b$. Is it possible to scale $M$ to $M_S$ such that all the eigenvalues of $M_s$ lie in the interval $[-1,1]$?

One method I came across:
Scale such that
$$
M_s=\frac{M-(b+a)/2}{(b-a)/2}.
$$
But, this is not working. Does anyone know anything better?

Best Answer

I found out that the following transformation works, $$Ms=\frac{M−((b+a)/2) I}{(b−a)/2}$$ where I is a Identity matrix.
$M_s$ also has the same eigenvectors as the original matrix $M$.