Difference between Singular Value Decomposition and Smith Decomposition

20 views (last 30 days)
Is there any difference between Singular Value Decomposition and Smith Decomposition?
Is there any relation between the two or they are one and the same thing?
I know Smith decomposition can be applied to only square matrices (in Matlab) and SVD is applicable to any matrix.
However if we take any mxn matrix and derive the SVD and Smith forms, then would they be the same or different?
  6 Comments
Siddhanth Sunil Shah
Siddhanth Sunil Shah on 12 Jan 2022
@Christine Tobler yes i was working on the MIMO transfer function matrices in the Smith form with rectangular matrices but could not proceed ahead with the SmithForm() function available in MATLAB only for square matrices.
I do have a need for computing Smith form for rectangular matrices and wrote an algorithm myself but I guess it does'nt work the way it should.
Christine Tobler
Christine Tobler on 12 Jan 2022
Thank you both for the explanations, I have passed this information on to colleagues in the Symbolic Toolbox.

Sign in to comment.

Accepted Answer

John D'Errico
John D'Errico on 8 Jan 2022
Edited: John D'Errico on 8 Jan 2022
How does this apply to MATLAB? This really is a question purely about linear algebra.
Are they the same? No, they are not. Yes, they look somewhat alike in what they return, ALMOST.
The smithForm applies ONLY to square matrices. But also, it applies ONLY to integer valued matrices. READ THE HELP!
help smithForm
SMITHFORM Smith normal form. S = SMITHFORM(A) computes the Smith normal form of the square invertible matrix A. The elements of A must be integers or univariate polynomials in the variable x = symvar(A,1). The Smith form S is a diagonal matrix. The first diagonal element divides the second, the second divides the third, and so on. [U,V,S] = SMITHFORM(A) also computes unimodular transformation matrices U and V, such that S = U*A*V. S = SMITHFORM(A,x) computes the Smith Normal Form of the square invertible matrix A. The elements of A are regarded as univariate polynomials in the specified variable x. [U,V,S] = SMITHFORM(A,x) also computes unimodular transformation matrices U and V, such that S = U*A*V. Example: >> A = sym(invhilb(5)); >> S = smithForm(A) S = [ 5, 0, 0, 0, 0] [ 0, 60, 0, 0, 0] [ 0, 0, 420, 0, 0] [ 0, 0, 0, 840, 0] [ 0, 0, 0, 0, 2520] >> syms x y >> A = [2/x+y, x^2-y^2; 3*sin(x)+y, x]; >> [U,V,S] = smithForm(A,y) U = [ 0, 1] [ x, y^2-x^2] V = [ 0, 1] [ 1/x, -(3*sin(x))/x-y/x] S = [ 1, 0] [ 0, 3*y^2*sin(x)-3*x^2*sin(x)+y^3+y*(-x^2+x)+2] >> simplify(U*A*V - S) ans = [ 0, 0] [ 0, 0] >> A = [2*(x-y),3*(x^2-y^2);4*(x^3-y^3),5*(x^4-y^4)]; >> [U,V,S] = smithForm(A,x) U = [ 0, 1] [ 1, -x/(10*y^3)-3/(5*y^2)] V = [ -x/(4*y^3), -(5*x*y^2)/2-(5*x^2*y)/2-(5*x^3)/2-(5*y^3)/2] [ 1/(5*y^3), 2*x^2+2*x*y+2*y^2] S = [ x-y, 0] [ 0, x^4+6*x^3*y-6*x*y^3-y^4] See also HERMITEFORM, JORDAN. Documentation for smithForm doc smithForm
Next, try it out. Don't know if they are different? TRY IT.
A = magic(3)
A = 3×3
8 1 6 3 5 7 4 9 2
[U,S,V] = svd(A)
U = 3×3
-0.5774 0.7071 0.4082 -0.5774 0.0000 -0.8165 -0.5774 -0.7071 0.4082
S = 3×3
15.0000 0 0 0 6.9282 0 0 0 3.4641
V = 3×3
-0.5774 0.4082 0.7071 -0.5774 -0.8165 -0.0000 -0.5774 0.4082 -0.7071
[U2,S2,V2] = smithForm(A)
U2 = 3×3
0 0 1 0 1 23 1 -164 -3749
S2 = 3×3
0 24 53 1 -10 -22 -4 -3 -7
V2 = 3×3
1 0 0 0 1 0 0 0 360
They don't look the same to me. But then I do need a new set of glasses.
Finally, if you try using smithform even on a square matrix that has non-integer elements, it will fail.
A = randn(2)
A = 2×2
-1.4674 -0.1167 -0.3505 -0.0260
svd(A)
ans = 2×1
1.5134 0.0018
smithForm(A)
Error using mupadengine/feval_internal
Unable to convert the matrix entries to integers or univariate polynomials.

Error in smithForm (line 96)
Usym = feval_internal(symengine,'symobj::smithForm',A);
The Smith normal form is designed to solve a totally different set of problems compared to when one would use the svd. They are different tools, with different properties, different purposes, and different results.
  2 Comments
Paul
Paul on 8 Jan 2022
Edited: Paul on 8 Jan 2022
As stated in the Help, the function smithForm() also applies to symbolic, polynmomial matrices, not just integer valued matrices.
While true that the smithForm() function is limited to square matrices, it's worth pointing out that that is a limitation of Matlab's implementation and not of the Smith form in general, as shown in the wikipedia link.
As shown in the Help, this line should be
%[U2,S2,V2] = smithForm(A)
[U2,V2,S2] = smithForm(A)
which, of course, wouldn't change the conclusion that Smith and SVD are different.
As an aside, I'm not too surprised that smithForm() accepts a double as input, but I am surprised it returns double (not sym) as output.
John D'Errico
John D'Errico on 8 Jan 2022
Agreed, as part of the symbolic TB, it would make sense for it to return a symbolic result.
I do wish they had chosen different names for the return variables. While it is completely irrelevant what they call the variables, people will see U,S,V, and get confused, thinking the two are the same.

Sign in to comment.

More Answers (1)

Siddhanth Sunil Shah
Siddhanth Sunil Shah on 8 Jan 2022
Thank you for your insights! :)

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!