1

I want to generate a square matrix for which all eigenvalues lies inside the unit circle. Any simple way to do that in Matlab? I am not sure but such matrix is normally called schur-stable.

P.S. I want eigenvalues to be allowed to be complex because I know how to do it for the case of real eigenvalues.

Edit: I want my matrix to be real.

Alex Mathy
  • 85
  • 5
  • 2
    one easy way I think is to generate randomly the n complex numbers inside the unit circle. Make those the elements/e-values of a diagonal matrix D. Then make any similarity transformation $PDP^{-1}$ . I think that would suffice. – minmax Feb 04 '22 at 14:23
  • 2
    Take a stochastic matrix $S$ and consider $kS$ with $|k|<1$... – Jean Marie Feb 04 '22 at 14:34
  • @minmax I thought about it, but then I want the matrix to be real with complex eigenvalues, I have to find proper $P$ for that, which complicates the things – Alex Mathy Feb 04 '22 at 14:41
  • @JeanMarie seems to me constraining to consider stochastic matrices only. – Alex Mathy Feb 04 '22 at 14:43
  • 3
    How abou: Generate a random real matrix without any condition on the eigenvalues; then divide by the modulus of the largest eigenvalue. – GEdgar Feb 04 '22 at 14:49
  • @GEdgar this might work! – Alex Mathy Feb 04 '22 at 14:50

2 Answers2

1

There are a number of ways to do what you want, but it is not clear what properties you want the matrix to have. For example, generating $n$ random numbers between $-1$ and $1$ and calling them a diagonal matrix works, generating a random orthogonal matrix (random = uniform with respect to the haar measure on the orthogonal group), generating a random special orthogonal matrix, a random symplectic matrix, a random stochastic matrix (as suggested by Jean Marie in the comments), and the list goes on. Unless you specify what properties you want your "random" matrices tp have, there are too many answers.

Igor Rivin
  • 25,994
  • 1
  • 19
  • 40
0

For $A$ an $n\times n$ matrix ( complex or real), denote by $\rho(A)$ its spectral radius, and by $\|A\|$ its operator norm for the standard $L^2$ norm on the space. We have $$\rho(A) \le \|A\|$$

Note, $\|A\|$ is the largest diagonal entry in the singular value decomposition of $A$. So far so good.

Now, we have the result:

$\rho(A)< 1$ if and only if for a conjugate $TAT^{-1}$ of $A$ we have $\|TAT^{-1}\|< 1$. One way ( from RHS to LHS is easy), the other can be done using say the Jordan form).

Therefore, to produce a Schur stable $A$ ( $\rho(A)< 1$), start with a matrix $B$ with $\|B\|< 1$ and conjugate it by some invertible matrix. Now to get a matrix $B$ as above, take any matrix $C$, write its singular value decomposition $$C = U \cdot D \cdot V$$ and take $$B = U \cdot D_1 \cdot V$$ obtained from $C$ by altering only its diagonal part to have entries in $[0,1)$.

Summing up:

  1. Take any random matrix $C$ and get its SVD

  2. Alter the above SVD to get $B$ with $\|B\|< 1$

  3. Conjugate $B$ by a random invertible and get $A$.

orangeskid
  • 53,909