conj

Complex conjugate of quaternion

Description

example

quatConjugate = conj(quat) returns the complex conjugate of the quaternion, quat.

If $q=a+b\text{i}+c\text{j}+d\text{k}$, the complex conjugate of q is ${q}^{*}=a-b\text{i}-c\text{j}-d\text{k}$. Considered as a rotation operator, the conjugate performs the opposite rotation. For example,

a = q*conj(q);
rotatepoint(a,[0,1,0])
ans =

0     1     0

Examples

collapse all

Create a quaternion scalar and get the complex conjugate.

q = normalize(quaternion([0.9 0.3 0.3 0.25]))
q = quaternion
0.87727 + 0.29242i + 0.29242j + 0.24369k

qConj = conj(q)
qConj = quaternion
0.87727 - 0.29242i - 0.29242j - 0.24369k

Verify that a quaternion multiplied by its conjugate returns a quaternion one.

q*qConj
ans = quaternion
1 + 0i + 0j + 0k

Input Arguments

collapse all

Quaternion to conjugate, specified as a scalar, vector, matrix, or array of quaternions.

Data Types: quaternion

Output Arguments

collapse all

Quaternion conjugate, returned as a quaternion or array of quaternions the same size as quat.

Data Types: quaternion

Version History

Introduced in R2021a