Quaternion Function Reference

abs

Absolute value, or modulus, of a quaternion
(Quaternion overloading of standard MATLAB® function)

Syntax

Y = abs(X)

Description

abs(X) returns an array Y such that each element of Y is the absolute value, or modulus, of the corresponding element of X.

If X is a complex quaternion, abs(X) returns the complex modulus, the square root of the complex semi-norm, computed in the same way (the square root of the sum of the squares of the components of the quaternion). The semi-norm of a complex quaternion can vanish (see references), and therefore so can the modulus.

Examples

abs(quaternion(1,1,1,1))

ans = 2
abs is vectorized, and hence can operate on arrays:
abs([qi, qj, qk, qi + qj])

ans =

    1.0000    1.0000    1.0000    1.4142
It can also operate on complex quaternions, with complex modulus, in general:
abs(1 + i + qi + qj + qk)

ans = 1.8174 + 0.5503i
The following shows that a complex quaternion can have a vanishing modulus (and semi-norm):
abs(i + qi)

ans = 0

See Also

QTFM function: normq
MATLAB® function: abs

References

  1. Sangwine, S. J. and Alfsmann, D., 'Determination of the biquaternion divisors of zero, including the idempotents and nilpotents', e-print arXiv:0812.1102, 8 December 2008, available at http://arxiv.org/abs/arxiv:0812.1102.
  2. W. R. Hamilton, Lectures on Quaternions, Lecture VII, §672, p669. Hodges and Smith, Dublin, 1853. Available online at: http://historical.library.cornell.edu/math/.

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

License terms.