I CODED THE PROGRAM BUT DON'T KNOW WHY STATEMENT IS NOT SHOWING, Using the singular value decomposition, prove that σ¯(AB) ≤ σ¯(A)¯σ(B)
Show older comments
% USING SINGULAR VALUE DECOMPOSITION WE HAVE TO PROVE THE GIVEN CONDITION %
>> %///CODE///%
>> A = randi(100,5); % RANDOM INTEGER VARIABLE IS DECLARED FOR A MATRIX %
>> B = randi(100,5); % RANDOM INTEGER VARIABLE IS DECLARED FOR B MATRIX %
>> % NOW WE WILL DECLARE OUR SVD COMPONENTS U, S AND V %
>> [U1, S1, V1] = svd(A);
>> [U2, S2, V2] = svd(B);
>> [U12, S12, V12] = svd(A*B);
>> sigma_A = diag(S1);
>> sigma_B = diag(S2);
>> sigma_AB = diag(S12);
>> sigma_X = sigma_A.*sigma_B;
>> for i=10: size(A, 1)
if sigma_AB(i)<=sigma_X(i)
disp('THE GIVEN STATEMENT IS TRUE' )
else
disp('THE GIVEN STATEMENT IS FALSE' )
end
end
>> % AS PER QUESTION WE HAVE TO TAKE TWO SAMPLES TESTS %
>> % TEST-1 %
>> sigma_AB
sigma_AB =
1.0e+04 *
5.4496
0.4558
0.1910
0.1132
0.0912
>> sigma_X
sigma_X =
1.0e+04 *
5.6453
0.6107
0.3209
0.1247
0.0355
AFTER THIS THE GIVEN STATEMENT SHOW SHOW BY COMPARING BOTH'S OUTPUT BUT IT IS NOW SHOWING %
WHRE I AM DOING WRONG??
2 Comments
John D'Errico
on 23 Feb 2022
Must I point out that you cannot prove the validity of such a question by a numerical example? At best, you could disprove it (were it false) using a valid counter-example.
Paul
on 23 Feb 2022
I realize the code isn't working as intended, but it looks like it's trying to verify that all singular values satisfy the conjecture. However, the problem statement looks like (I can't tell for sure) that the conjecture is only applicable to the maximum singular values of the matrices A and B.
Accepted Answer
More Answers (1)
John D'Errico
on 23 Feb 2022
Edited: John D'Errico
on 23 Feb 2022
I assume your question applies to a theorem about the singular values of the product of matrices. That is, if we compute the singular values of matrices A and B, then the singular values of the product of the two matrices, while not known, must follow an inequality. So if the singular values are sorted in decreasing order, then we must have that the singular values of the product matrix must be less than the corresponding product of the singular values of A and the MAXIMUM singlar value of B.
For the above to be true, then it must also be true that the product of the matrices is POSSIBLE! In the code you wrote, with A and B matrices that were both 100x5, you CANNOT form A*B. PERIOD.
So lets try this with a problem where we can actually do the computations. In this example, I'll use A as a SQUARE matrix.
A = magic(5)
That means we can multiply A by a matrix with 5 rows. 100 rows is impossible, as the matrices do not conform for matrix multiplication. This one should do for B:
B = hilb(5)
So a 5x5 Hilbert matrix. The elements of B have the property that B(i,j) = 1/(i+j-1). They are both non-singular matrices, but that is not important for the question at hand, except that a singular matrix would introduce issues with floating point arithmetic.
I've used deterministic matrices, so it will be easier for you to follow what I did. If you wanted to use random matrices, well, whatever floats your boat is ok with me.
SA = svd(A); % we don't care about U and V
SB = svd(B);
SAB = svd(A*B);
format long g
[SA,SB,SAB,SA.*SB(1)]
Now, the question is if the product of the singular values of A with the largest singular value of B is greater than the singular values of the product matrix.
SAB <= SA.*SB(1)
all(SAB <= SA.*SB(1))
So that is true, at least for this example. This is not a proof, merely an example. But that seems to be your goal.
However, be careful, as it is not true that we can form the product of all the singular values, and then assume an inequality applies to the singular values of the product of the matrices.
For example:
[SAB,SA.*SB,SAB < SA.*SB]
There you see the inequality does not apply.
If you wanted a proof of the assertion I show by example, look here:
1 Comment
Abhisek Singh
on 23 Feb 2022
Categories
Find more on Logical 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!