<p>No; quaternions can only represent proper rotations (i.e. without reflection).</p>
<p>If you use non-unit quaternions, you can represent a combination of rotation and uniform scaling, but still not reflection.</p>

CC BY-SA 4.0
2022-12-01T22:37:34.017Z
https://www.euclideanspace.com/maths/geometry/affine/reflection/quaternion/index.htm the math is slightly different for reflections
pmw1234
CC BY-SA 4.0
2022-12-02T00:35:20.480Z
It's a non-standard application of quaternions. If you want to change the math, then you can do whatever you want of course. You can represent arbitrary reflections as a scale of (-1, 1, 1) followed by a quaternion rotation, too.
Nathan Reed
CC BY-SA 4.0
2022-12-02T10:34:31.960Z
This isn't inventing new math, and it certainly isn't changing the rules. And this little "trick" can be very handy.
pmw1234
CC BY-SA 4.0
2022-12-06T03:00:13.727Z
@pmw1234 it says you can't use them for reflections and rotations simultaneously.
Criticize SE actions means ban
CC BY-SA 4.0
2022-12-01T16:44:10.947Z
2022-12-01T16:44:10.947Z
Nathan Reed
<p>Say we have the transformation:</p>
<p><span class="math-container">\begin{bmatrix}
1 &amp; 0 &amp; 0\\
0 &amp; 0 &amp; 1\\
0 &amp; 1 &amp; 0\\
\end{bmatrix}</span></p>
<p>i.e. the matrix that encodes swapping the z and y axes. This is equivalent to a reflection around the z=y line.</p>
<p>Is it possible to encode this same transformation in a quaternion?</p>

CC BY-SA 4.0
2022-11-30T22:25:44.587Z
The short answer is: yes. Search for "Quaternion to Matrix" and "Matrix to Quaternion" to get code examples.
pmw1234
CC BY-SA 4.0
2022-12-01T11:29:45.393Z
All the vectors in the matrix must be unit length though. But the example you gave they are.
pmw1234
<mathematics><animation><linear-algebra><quaternions>
Can you encode a reflection in a quaternion?
Makogan
# Can you encode a reflection in a quaternion?

(Asked by: username_0 on 2022-11-30)

Say we have the transformation:

\begin{bmatrix}
1 & 0 & 0\\
0 & 0 & 1\\
0 & 1 & 0\\
\end{bmatrix}

i.e. the matrix that encodes swapping the z and y axes. This is equivalent to a reflection around the z=y line.

Is it possible to encode this same transformation in a quaternion?

**Tags:** mathematics, animation, linear-algebra, quaternions

> **Comments:**
> **username_1**: The short answer is: yes. Search for "Quaternion to Matrix" and "Matrix to Quaternion" to get code examples.  
> **username_1**: All the vectors in the matrix must be unit length though. But the example you gave they are.  

---

## 1 answers

### Answer by username_2 on 2022-12-01. Score: 1 | Accepted answer

No; quaternions can only represent proper rotations (i.e. without reflection).

If you use non-unit quaternions, you can represent a combination of rotation and uniform scaling, but still not reflection.

> **Comments:**
> **username_1**: https://www.euclideanspace.com/maths/geometry/affine/reflection/quaternion/index.htm the math is slightly different for reflections  
> **username_2**: It's a non-standard application of quaternions. If you want to change the math, then you can do whatever you want of course. You can represent arbitrary reflections as a scale of (-1, 1, 1) followed by a quaternion rotation, too.  
> **username_1**: This isn't inventing new math, and it certainly isn't changing the rules. And this little "trick" can be very handy.  
> **username_3**: @username_1 it says you can't use them for reflections and rotations simultaneously.  

---

