Given that , and we are given the square matrix , the problem is to find and .
So lets say .
Then which is a symmetric matrix.
So if then
Hi all, I'm new here. I'm currently doing a thesis on image compression and embedding. However, I'm stuck at a final part of my calculations.
Lets say you have a square matrix A. Taking the transpose of the matrix A you will get another square matrix A'.
Multiplying A by A' you get another square matrix B.
Example: A X A' = B
Now assuming you only have the matrix B given to you. How do you find the value of matrix A?
Hope you guys can help in this. Thanks alot.
i have checked out the LU-decomposition method and i found it didn't help much in obtaining the product of a matrix and its transpose. Writing the long equation in MATLAB will be a bit difficult as i'm dealing with a 512 X 512 image which will be having many unknowns. Any more suggestions will me most welcomed. By the way, many thanks to tukeywilliams.
Since if implies is symmetric, there exists an orthogonal matrix such that and is a diagonal matrix with the eigenvalues of along the diagonal and the columns of are the eigenvectors of . is called a unitary transformation. Since is orthogonal, and thus
Further, since when is nonsingular, is positive definite and thus has positive eigenvalues. Thus where has the square roots of the eigenvalues of on the diagonal.
Then where . So the problem is reduced to finding the eigenvalues and eigenvectors of a symmetric matrix There are efficient numerical methods for this.
Correct me if I'm wrong.
Assuming that I extracted the eigenvectors and eigenvalues of B using MATLAB. So i now have a matrix of the eigenvectors of B (eig_vec) and a matrix of the eigenvalues of B (eig_val).
[eig_vec eig_val] = eig(B);
Then D has the square roots of the eigenvalues of B on the diagonal. So i take the square root of the eigenvalues of B.
D = sqrtm(B);
The columns of P are the eigenvectors of B, which means P is equal to the eigenvectors of B.
P = eig_vec;
To find A,
A = PD;
Is this the square root of B or the eigenvalues of B?Then D has the square roots of the eigenvalues of B on the diagonal. So i take the square root of the eigenvalues of B.
D = sqrtm(B);
Yes. And then you must check that you actually getThe columns of P are the eigenvectors of B, which means P is equal to the eigenvectors of B.
P = eig_vec;
To find A,
A = PD;
I have experimented with a 4X4 image. The matrix obtain from the image is B.
After having extracted the eigenvalues and eigenvectors, P of B;
The transpose of the eigenvectors is
The inverse of the eigenvectors is
The product of is not equal to
The square root of the eigenvalues of B consist of a complex number
Hope JakeD can comment on this. Thanks
First, the matrix is not symmetric as is. The entry 2,4 (row 2, column 4) is not equal to the entry 4,2. It looks like a typo and entry 2,4 is missing a 6 at the end. Then the matrix is symmetric.
Second, on any typical computer, numbers like -3.8858e-016 are effectively 0 except for rounding error because numbers like this are at the limits of machine accuracy. But all the entries not on the diagonal are like that. Setting all those entries to zero means the matrix is effectively the identity matrix and the problem is the trivial one B = I and A = A^T = I.
Where did this matrix come from?
Sorry about the typo error. The matrix is symmetrical. The matrix is obtained through a test matrix A multiplied by A transposed. The matrix is generated from a test image of 4 X4. It seems that any image i use, i still get a symmetrical matrix with ones in the diagonal.
The matrix B comes from the product of A and A transposed.
which is not the matrix B you gave above. Is this a different matrix, or is it different because the A matrix wasn't printed with enough precision? Anyway, the B matrix still looks strange. Why is it so close to the identity matrix?Code:1.0000e+00 -1.4105e-06 -8.6817e-06 3.1304e-06 -1.4105e-06 1.0000e+00 2.6298e-06 -6.2810e-06 -8.6817e-06 2.6298e-06 1.0000e+00 6.8791e-06 3.1304e-06 -6.2810e-06 6.8791e-06 1.0000e+00
JakeD, i also noticed this problem and did some manual calculations on it. I think is the rounding error of the MATLAB. Mentioning earlier about the eigenvectors of B are not orthogonal, actually they are. At first they seem not as there are rounding errors. But when i manually check, they are orthogonal.
Now the problem is to find D. I'm having problems with finding D as my eigenvalues obtained trough MATLAB are all ones in the diagonal except for [1,1] which is a negative small value.
On why the B similar to an identity matrix, this i do not know.
I think this is the main issue. Resolve this and things should work.On why the B similar to an identity matrix, this i do not know.