Anonymous user
Quaternion type: Difference between revisions
m
Use proper subscripts in problem description
m (Use proper subscripts in problem description) |
|||
Line 4:
A complex number has a real and complex part written sometimes as <code>a + bi</code>, where a and b stand for real numbers and i stands for the square root of minus 1. An example of a complex number might be <code>-3 + 2i</code>, where the real part, a is -3.0 and the complex part, b is +2.0.
A quaternion has one real part and ''three'' imaginary parts, i, j, and k. A quaternion might be written as <code>a + bi + cj + dk</code>. In this numbering system, <code>ii = jj = kk = ijk = -1</code>. The order of multiplication is important, as, in general, for two quaternions
There is a list form of notation where just the numbers are shown and the imaginary multipliers i, j, and k are assumed by position. So the example above would be written as (1, 2, 3, 4)
Given the three quaternions and their components:
q = (1, 2, 3, 4) = (a, b, c, d )
And a wholly real number <code>r = 7</code>.
Line 20:
# The conjugate of a quaternion:<br><code>=( a, -b, -c, -d)</code>
# Addition of a real number r and a quaternion q:<br><code>r + q = q + r = (a+r, b, c, d)</code>
# Addition of two quaternions:<br><code>
# Multiplication of a real number and a quaternion:<br><code>qr = rq = (ar, br, cr, dr)</code>
# Multiplication of two quaternions
# Show that, for the two quaternions
If your language has built-in support for quaternions then use it.
|