Quaternion Function Reference

normq

Norm of a quaternion

Syntax

Y = normq(X)

Description

(Not to be confused with the function norm which computes a matrix norm.)

normq(X) returns an array Y such that each element of Y is the norm of the corresponding element of X. The norm is the sum of the squares of the four components (three components in the case where X is pure).

If X is a complex quaternion, normq(X) returns the complex semi-norm, computed in the same way. The semi-norm of a complexified quaternion can vanish (see references).

Examples

normq(quaternion(1,1,1,1))

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

ans = 1     1     1     2
 
It can also operate on complex quaternions yielding a complex result in general (the semi-norm):
>> normq(1 + i + qi + qj + qk)

ans = 3.0000 + 2.0000i
The following shows that a complex quaternion can have a vanishing norm and modulus:
>> normq(i + qi)

ans = 0

See Also

QTFM functions: abs, norm

References

  1. Sangwine, S. J. and Alfsmann, D., 'Determination of the biquaternion divisors of zero, including the idempotents and nilpotents', Advances in Applied Clifford Algebras, 20(2), May 2010, 401-410, DOI: 10.1007/s00006-010-0202-3. Published online 9 January 2010. Also available as: e-print arXiv:0812.1102, 8 December 2008, 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-2013 Stephen J. Sangwine and Nicolas Le Bihan

License terms.