0
$\begingroup$

My goal is to generate a positive (entry-wise) matrix $P\in \mathbb{R}_{>0}^{N\times m}$ and then to set $S=PP^T$ such that the largest eigenvalue of $S$ is $\approx 1$ (or equal). Note that if $y$ is a row vector then $ySy^T=(yP)(yP)^T=\|yP\|^2 \geq 0$ so $S$ is positive semidefinite, and since $S$ is also symmetric, all the eigenvalues are thus real and positive.

I am not quick with linear algebra, so I first tried looking into factorizations of a symmetric PSD matrix. For example since $S$ is symmetric and real we can write $S=Q\Lambda Q^T$ where $QQ^T=I$ is an orthogonal matrix whose columns are the eigenvectors of $S$ and $\Lambda$ is a diagonal matrix with the eigenvalues on the diagonal. Since these are real and positive we can write $S=(Q \Lambda^{1/2})(Q \Lambda)^T$ so I tried to start with randomly generating $P=Q\Lambda$ by specifying the eigenvalues to start with $1,\lambda_2,\dotsc$ in decreasing order randomly and $Q$ a random orthogonal matrix. But then $P$ is not necessarily positive, and so neither is $S$ which I need. Any pointers would be greatly appreciated. I repeat the question below for succinctness.

My Question Is it possible to generate a random symmetric matrix of the form $S=PP^T$ where $P$ is positive entrywise and the largest eigenvalue of $S$ is $1$?

$\endgroup$
2
  • $\begingroup$ What are the required dimensions of $P$? $\endgroup$
    – JimmyK4542
    May 25, 2022 at 1:16
  • $\begingroup$ @JimmyK4542 $P$ does not necessarily need to be square, but $P\in \mathbb{R}_{>0}^{N\times m}$ where $m\leq N$, and if if can be done with $m>N$ I’d be interested in that too. I’ll add this to the main body of the question too. $\endgroup$ May 25, 2022 at 1:24

1 Answer 1

1
$\begingroup$

One way to generate a random symmetric matrix of the form $S=PP^T$ where $P$ is positive entrywise and the largest eigenvalue of $S$ is $1$ is to let $R$ be an $n \times m$ matrix whose entries are i.i.d. from any distribution whose support is contained in $(0,\infty)$, and then let $P = \tfrac{1}{\sigma_1(R)}R$, where $\sigma_1(R)$ is the largest singular value of $R$. The entries of $R$ are all positive, and it's largest singular value is positive, so the entries of $P$ are all positive. Furthermore, the largest eigenvalue of $RR^T$ is $\sigma_1(R)^2$, so the largest eigenvalue of $S = PP^T = \tfrac{1}{\sigma_1(R)^2}RR^T$ is $1$.

$\endgroup$
2
  • $\begingroup$ +1 for the prompt response and example, but I guess I did not emphasize “random” enough in the original question. $\endgroup$ May 25, 2022 at 1:34
  • $\begingroup$ Thank you! I guess I need to learn more about SVD! This is awesome. $\endgroup$ May 25, 2022 at 2:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .