Quaternion Function Reference

svd

Singular value decomposition
(Quaternion overloading of standard MATLAB® function)

Syntax

[U,S,V] = svd(X, econ)

Description

svd computes the quaternion singular value decomposition. This decomposition generalises from the case of real and complex matrices. The singular values are real (even in the case of a complex quaternion matrix), and the singular vectors are quaternion-valued (complex quaternion-valued in the case of a complex quaternion matrix). Thus U and V are unitary quaternion matrices, and S is a real diagonal matrix.

Examples

Construct a matrix at random, decompose it, and show that the matrix can be reconstructed from the decomposition, to within rounding error:
>> q = randq(4)
 
q = 4x4 quaternion array
 
>> [U, S, V] = svd(q)
 
U = 4x4 quaternion array
 
S =

    3.0473         0         0         0
         0    2.1201         0         0
         0         0    1.3996         0
         0         0         0    0.5104

V = 4x4 quaternion array
 
>> U * S * V' - q
 
ans = 4x4 quaternion array
 
>> max(max(abs(ans)))

ans = 1.8660e-15
Similarly with a complex quaternion matrix (note the double use of abs when checking the reconstruction - because the modulus of a complex quaternion is complex it is necessary to take the modulus of the modulus so that the maximum can be found):
>> q = complex(randq(4), randq(4)) .* randn(4)
 
q = 4x4 complex quaternion array
 
>> [U, S, V] = svd(q)
 
U = 4x4 complex quaternion array
 
S =

    6.9636         0         0         0
         0    2.8856         0         0
         0         0    1.9821         0
         0         0         0    0.5788

V = 4x4 complex quaternion array
 
>> U * S * V' - q
 
ans = 4x4 complex quaternion array
 
>> max(max(abs(abs(ans))))

ans = 6.8965e-13

See Also

QTFM function: svdj
MATLAB® function: svd

References

  1. F. Z. Zhang, 'Quaternions and Matrices of Quaternions', Linear Algebra and its Applications, 251, January 1997, 21-57. DOI: 10.1016/0024-3795(95)00543-9
  2. S. J. Sangwine and N. Le Bihan, 'Quaternion Singular Value Decomposition based on Bidiagonalization to a Real or Complex Matrix using Quaternion Householder Transformations', Applied Mathematics and Computation, 182 (1), 1 November 2006, 727-738. DOI: 10.1016/j.amc.2006.04.032.
  3. S. J. Sangwine and N. Le Bihan, 'Quaternion Singular Value Decomposition based on Bidiagonalization to a Real Matrix using Quaternion Householder Transformations', arXiv:math.NA/0603251, 10 March 2006. Available at http://www.arxiv.org/.

© 2008-2013 Stephen J. Sangwine and Nicolas Le Bihan

License terms.