Symbolic SVD for square matrix
7 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I'm developing a generic study of singular value decomposition (SVD) for square symetric matrix. The aim is to obtain generic functions where to substitute the generic coefficients of the matrix for functions to solve whether they became 0 or not. My code for the generic SVD computation is the following one:
clear;clc;
M = sym('M', [6 6]);
assume(M,'real');
M(2,1) = M(1,2);
M(3,1) = M(1,3);
M(3,2) = M(2,3);
M(4,1) = M(1,4);
M(4,2) = M(2,4);
M(4,3) = M(3,4);
M(5,1) = M(1,5);
M(5,2) = M(2,5);
M(5,3) = M(3,5);
M(5,4) = M(4,5);
M(6,1) = M(1,6);
M(6,2) = M(2,6);
M(6,3) = M(3,6);
M(6,4) = M(4,6);
M(6,5) = M(5,6);
disp(M);
detM = det(M);
disp('Determinant already computed... ');
svdM = svd(M);
The problem is that everything works fine when you describe a symbolic matrix with size smaller than 5 x 5. However, when I tested it with 6 x 6 or bigger matrixes, it seems that Matlab cannot handle the computation and never shows a results. I'll leave the code running for 5 days without obtaining any result, which is pretty strange because with 5x5 or below matrixes, it computes them perfectly under 2 minutes of time. Thus, I am wondering if this issue is some sort of limitation of symbolic computation of SVD? How could I compute efficiently the SVD for large symbolic matrixes?
Thanks in advance for any possible help!
0 个评论
回答(1 个)
Christine Tobler
2021-5-17
The computation of the SVD in symbolic mathematics involves the solving of a polynomial equation of degree given by the size of the input matrix. However, there is no closed-form solution in general for polynomial equations that are quintic or higher: https://en.wikipedia.org/wiki/Closed-form_expression#Example:_roots_of_polynomials
So the problem is not solvable.
3 个评论
Christine Tobler
2021-5-17
My guess is it's running for 5 days attempting to figure out if this specific problem (with the addition of knowing the input matrix is symmetric) is solvable. I might be off about what it's doing exactly, I don't know much about the inner workings of symbolic.
But in general, getting a direct formula for a generic matrices' eigenvalues or singular values isn't realistically useful except maybe for a 2-by-2 or 3-by-3 matrix, the complexity just grows too quickly.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!