How can i split a matrix into product of two matrices in matlab?
Show older comments
I am having a matrix A which is formed by multplying matrix X with it's conjugate transpose (A=X*X'),how can i find matrix X from A?
Accepted Answer
More Answers (1)
John D'Errico
on 15 Feb 2015
0 votes
help chol
5 Comments
Betha Shirisha
on 15 Feb 2015
Betha Shirisha
on 15 Feb 2015
emehmetcik
on 15 Feb 2015
Edited: emehmetcik
on 15 Feb 2015
If the A matrix is not positive definite, it means that the solution you are looking for is not unique. That is to say, there are many X matrices satisfying A = X*X'.
You can find 'a' solution (not 'the' solution) by
- 'cholcov' function. help cholcov
- 'svd' function. [s, v, d] = svd(A), x = v * sqrt(v). % Since A is symmetric...
John D'Errico
on 15 Feb 2015
Edited: John D'Errico
on 15 Feb 2015
@emehmetcik - NO. Your statement is simply not correct. You are possibly confusing the idea of positive definite with singularity for a matrix.
A singular matrix will have infinitely many solutions.
A positive definite matrix M has the property that for any possible vector x, the product (x'*M*x) will be a positive number.
This is sometimes confused by people, because if M is a singular matrix, then there exists some vector x such that M*x will yield the zero vector.
The error message returned by chol is a reflection of the requirement for chol, that it requires a matrix with real diagonal.
Your suggestion to use SVD will fail. Why? Because that error message is returned when the matrix has a complex diagonal element.
As you can see, the error message that is generated indicates a complex diagonal element was supplied.
chol(diag([1 0]))
Error using chol
Matrix must be positive definite.
chol(diag([i 0]))
Error using chol
Matrix must be positive definite with real diagonal.
Only when a diagonal element was not real did chol produce that message.
So the question is, can you find a factorization using the scheme you propose using SVD (or any scheme) for a matrix with diagonal elements that are not real? The simple answer is no, and in fact, that is easily proven.
Consider what the diagonal elements of a matrix as a product X*X' are formed from. The diagonal element (so the (k,k) element) of the matrix:
M = X*X'
will be
X(k,:)*X(k,:)'
So the dot product of a vector with itself, conjugate transposed. Consider that this result will NEVER be a complex number.
Therefore SVD will NEVER yield a solution to a problem that has no solution possible.
In addition, your suggestion to use cholcov will also fail, as it must.
cholcov([i 0 ;0 1])
ans =
[]
John D'Errico
on 15 Feb 2015
@Betha - The answer to you is that IF this error has been returned, it is because no solution exists, or can exist. As I point out above, a matrix with complex diagonal elements cannot be factorized in the form
M = X*X'
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!