Symbolic SVD for square matrix

3 visualizaciones (últimos 30 días)
Diego Rodríguez
Diego Rodríguez el 17 de Mayo de 2021
Comentada: Diego Rodríguez el 18 de Mayo de 2021
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!

Respuestas (1)

Christine Tobler
Christine Tobler el 17 de Mayo de 2021
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 comentarios
Christine Tobler
Christine Tobler el 17 de Mayo de 2021
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.
Diego Rodríguez
Diego Rodríguez el 18 de Mayo de 2021
Thank you so much for your answers. I'll figure out another way to do what I'm aiming to. That's true, the complexity grows too quickly when working with symbolic matrixes. I'll close this issue since it has no clear solution.

Iniciar sesión para comentar.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by