Search code examples
mathmatrixlinear-algebradecomposition

Generating Positive definite matrix of dimensions 8x8


I am trying to generate a positive definite matrix (A'*A) of dimensions 8x8. where A is 1x8.

I tried it for many randomly generated matrix A but not able to generate it.

octave-3.6.1.exe:166> A= (rand(1,8)+rand(1,8)*1i);
octave-3.6.1.exe:167> chol(A'*A);
error: chol: input matrix must be positive definite

Can anyone please tell me what is going wrong here. Thanks for the help in advance.


Solution

  • It's not possible to do that, since no matrix of that form is positive definite.

    Claim: Given a 1xn (real, n>1) matrix A, the symmetric matrix M = A'A is not positive definite:

    Proof: By definition, M is positive definite iff x'Mx > 0 for all non zero x. That is, iff x'A'Ax = (Ax)'Ax = (Ax)^2 = (A_1 x_1 + ... + A_n x_n) > 0 for all non zero x.

    Since the real values A_i are linearly dependent, there exists x_i, not all zero, such that A_1 x_1 + ... + A_n x_n = 0. We found a non zero vector x such that x'Mx = 0, so M is not positive definite.

    A different proof, that can be applied directly to the complex case is this: Let A be an 1xn (complex, n>1) matrix. Positive definiteness implies invertibility, so M = A*A must have full rank to be positive definite. It clearly has rank 1, so it's not invertible and thus not positive definite.