0
$\begingroup$

I am trying to generate a random symmetric positive definite matrix. I'm using Julia and have made a random matrix $A$ with it. Through a google search I found an equation $\frac{1}{2}(A + A') + nI$, with A being an $n \times n$ matrix. How ever I'm not sure why that results in a positive definite matrix, so have to take there word that it does. Also I am worried that the large difference in order of magnitude between the diagonal entries and off diagonal entries when adding $nI$ for large $n$, will result in Floating point errors later down in the congratulations.

Is there a way to transform a matrix $A$ into a new matrix that is symmetric positive definite were all the values are of similar orders of magnitudes? And could you please show that the result will always be symmetric and positive definite?

$\endgroup$
  • $\begingroup$ How about $AA^T$ ? $\endgroup$ – Mike Hawk Nov 5 '19 at 15:35
0
$\begingroup$

To transform a matrix $A$ to a symmetric matrix, you have just to do this $$A=\frac{1}{2}(A+A'),$$ where $A'$ is the transpose of $A$.

To get a positive definite matrix, calculate $A+\lambda I$, where $\lambda$ is just greater than the smallest eigenvalue of A.

$\endgroup$
  • $\begingroup$ How does that ensure that the matrix is positive definite? $\endgroup$ – seafan Nov 5 '19 at 18:56
  • $\begingroup$ @seafan What criteria do you know for determining that a matrix is positive definite? In particular, what can you say about the eigenvalues of a positive definite matrix? $\endgroup$ – amd Nov 5 '19 at 19:13
  • $\begingroup$ The eigenvalues of a positive definite matrix are all strictly positive. $\endgroup$ – user486789 Nov 5 '19 at 19:35
  • $\begingroup$ @amd The main criteria I know for determining that a matrix is positive definite is it's definition, that a Matrix $A$ is positive definite iff for all non-zero $x \in \mathbb{R}^n$, it is true that $x^T A x >0$. I know that a positive definite matrix has positive eigenvalues. what I don't innately see is why adding the $\lambda I$ guarantees that the matrix is now positive definite. $\endgroup$ – seafan Nov 5 '19 at 20:26
  • $\begingroup$ @seafan If $Av=\lambda v$, then what does $(A+cI)v$ equal? What does that say about the eigenvalues of $A+cI$? $\endgroup$ – amd Nov 5 '19 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.