Quaternions as 4x4 Matrices - Connections to Linear Algebra

  Рет қаралды 53,252

Mathoma

Mathoma

Күн бұрын

Пікірлер: 34
@SaadTaameOfficial
@SaadTaameOfficial 8 жыл бұрын
Awesome explanation. Just a little thing that you might want to create a video to explain. There are two matrices that we can extract from a quaternion multiplication p * q. We can extract the matrix for p (which corresponds to multiplying by a quaternion on the left) and we can extract the matrix for q (which corresponds to multiplying by a quaternion on the right). Fastforward to the video where you describe 3D rotations by using quaternions: here the formula is given by q * v * conj(q). Now people who write code are often presented with a routine to convert from quaternion to rotation matrix. This can be done by extracting the matrix for q (call it A) and extracting the matrix for conj(q) (call it B) and then multiplying B by A (or A by B). The matrices commute in this case. I hope that I did not make mistakes.
@Math_oma
@Math_oma 8 жыл бұрын
+Saad Taame Could you clarify what you mean by "extracting a matrix", perhaps with a numerical example? Furthermore, what is the point of converting the quaternion to a rotation matrix?
@SaadTaameOfficial
@SaadTaameOfficial 8 жыл бұрын
mdphdguy1 I mean representing the quaternion multiplication as a matrix-vector product. You showed the matrix corresponding to p in the video but there is another matrix corresponding to q. As for the rotation matrix, this is used in computer graphics.
@code-dredd
@code-dredd 7 жыл бұрын
+Mathoma The point of converting a quaternion to a rotation 3x3 matrix is for computer graphics. The graphics processors (GPUs) expect matrices, so they need to be converted. The formula to convert a quaternion to a rotation matrix looks very different[1] from the template you described in the video. Not sure if that's something you've explained in another video. If not, perhaps a video in the near future? [1] en.wikipedia.org/wiki/Rotation_matrix#Quaternion
@Math_oma
@Math_oma 7 жыл бұрын
+ray This matrix you cite is this way because the quaternions act in a two-sided manner to do rotations, i.e. the quaternion and its conjugate act on vectors by a left- and right-multiplication, both of which are linear operators. The matrix I have in this video does a left mutiplication and there's another matrix that does right multiplication. If you compose those two matrices/ linear transformations (multiply them together) you get a 4x4 matrix that looks like the one here and if you get rid of the first row and second column you get this matrix (after some substitutions based on the assumption you're using a unit quaternion: a^2+b^2+c^2+d^2=1). Although this might work well in practice, thinking of quaternions as acting through a one-sided transformation, i.e. represented by that single matrix you cite is no good at the abstract level because rotations in general act through two-sided transformation laws.
@vivekdabholkar5965
@vivekdabholkar5965 8 ай бұрын
Many thanks, makes it very easy to follow without excessive effort. This is how one should be taught to retain infomation!
@feedbackex
@feedbackex 7 жыл бұрын
Thank you so much, this is best explanation I have seen.
@brucemoore2944
@brucemoore2944 5 жыл бұрын
Great Videos. Question for you though. When you represented a quaternion as a 4x4 matrix in the beginning of this video, why did represent only one of the quaternions as a 4x4, the other as a 4x1, and not both matrices as 4x4's? Thank You in advanced for you response bruceam
@samtree99
@samtree99 5 жыл бұрын
Bruce Moore You can write two 4x4 and do the normal calculation, it will give you a 4x4 as a result matrix. On that result, you only care about the first column which is the new a,b,c,d. He was doing a simplified version by only calculate one column. He did mention it in the video. Pretty smart guy.
@mohammadhashemi4755
@mohammadhashemi4755 4 жыл бұрын
Some awesome explanations here! Thank you for this amazing video, really helful
@giobrach
@giobrach 5 жыл бұрын
In other words, there is a ring isomorphism between the ring of quaternions and a subring of 4x4 real antisymmetric matrices. There is also a similar isomorphism between the ring of quaternions and a subring of 2x2 *complex* matrices: through it, the four quaternionic units are translated into the Pauli matrices. To see this, divide the 4x4 matrices corresponding to the units into 2x2 blocks and "reverse" the usual isomorphism between complex numbers and 2x2 real antisymmetric matrices with identical elements on the diagonal ("2D rotation matrices")
@eddiecurrent7721
@eddiecurrent7721 5 жыл бұрын
Yes Einstein!
@stephenmorais8696
@stephenmorais8696 Жыл бұрын
Is there a way to do qvq-1 using matrices?
@jimnewton4534
@jimnewton4534 6 жыл бұрын
If a matrix times a matrix equal the matrix times a vector, then I think of eigenvalues and eigenvectors. What's the relation of quaternions to eigenvectors?
@david_porthouse
@david_porthouse Жыл бұрын
On the dodgy computer that I use, the CPU adds on small random errors whenever it does a multiplication. This will be disastrous if the graphics system uses vectors and t-matrices to do a chain of rotations. However with quaternions we can continually renormalise newly-generated quaternions so it isn’t so bad. If you replace quaternions with 4x4 matrices, well yes you can do it, but you are throwing away a principal merit of quaternions.
@cybernaut_ev3106
@cybernaut_ev3106 5 жыл бұрын
Very insightful. Have never seen it done like this before.
@sashamuller9743
@sashamuller9743 4 жыл бұрын
great series!!
@mauricepanero
@mauricepanero 6 жыл бұрын
Spinors?
@samsunnahar9175
@samsunnahar9175 7 ай бұрын
THANKS A LOT FOR EXCELLENT VIDEO!!!
@ΝικόλαοςΜελάς-π2γ
@ΝικόλαοςΜελάς-π2γ 8 жыл бұрын
another one great video! thank u
@SandburgNounouRs
@SandburgNounouRs 7 жыл бұрын
How can you multiply a (1,4) matrix (vector) by another (1,4) matrix and have for result a vector (1,4), the dimensions are incompatible, right ?
@Math_oma
@Math_oma 7 жыл бұрын
+SandburgNounouRs Remember we're converting the quaternion on the right to a column vector which is a 4 x 1 matrix (4 rows and 1 column). That's being multiplied on the left by a 4 x 4 matrix (the representation for the left quaternion) so the dimensions are compatible for matrix multiplication. Alternatively, I could have converted both left and right quaternions to their 4 x 4 matrix representation and multiplied those but using a column vector. That's actually what I'm thinking of when I say the quaternions can be thought of as a special subset of 4 x 4 matrices over the reals (this subset also forms a _ring_ ) of the form given in the video. The whole business of thinking of the one on the right as a column vector is a computational trick just because I didn't feel like multiplying out the whole 4 x 4 matrix, which is redundant anyway, and gives you the same quaternion in the end.
@PerthScienceClinic
@PerthScienceClinic 4 жыл бұрын
In effect, instead of multiplying two matrices, we're applying one to the other.
@lohdiwei9778
@lohdiwei9778 5 жыл бұрын
Certainly the most tiresome array of ones and zeroes and minuses that I have ever -- with a wee bit of admiration -- awarded a thumbs-up to! 👌😊
@5-sf
@5-sf Жыл бұрын
S tier video
@LowtechLLC
@LowtechLLC 5 жыл бұрын
Omg that is so helpful
@FloppyDobbys
@FloppyDobbys 6 жыл бұрын
YES!!
@FloppyDobbys
@FloppyDobbys 6 жыл бұрын
Valuable insights
@pladselsker8340
@pladselsker8340 3 жыл бұрын
thanks
@gideonbuckwalter4128
@gideonbuckwalter4128 8 жыл бұрын
Cool, so 1, i, j, and k are their own inverses!
@Math_oma
@Math_oma 8 жыл бұрын
+Gideon Buckwalter Well, the identity matrix is equal to its inverse but for the i,j,k matrices, remember that these three matrices will square to -1. That implies that the inverse is actually the negative of these i,j,k matrices. This also happens to be the conjugate, just like in the complex numbers.
@gideonbuckwalter4128
@gideonbuckwalter4128 8 жыл бұрын
Oh right! So the conjugate of 1, i, j, and k are 1, -i, -j, and -k which means the conjugate of any of these is their matrix inverse. Is that right?
@Math_oma
@Math_oma 8 жыл бұрын
+Gideon Buckwalter Yes, the quaternion conjugate works just like complex numbers - you just negate all the imaginary parts and keep the real part the same. Furthermore, if you examine the matrix representation, taking the matrix transpose gives the representation for the conjugate. Another reason for the inverse being equal to the conjugate is that the conjugate is set up so that q.q*=|q|^2 where |q| is the magnitude of the quaternion (same deal in the complex numbers). All those quaternions, 1,i,j,k all have a magnitude of 1 so that means q.q*=1 which means q^(-1)=q*.
@DrDeuteron
@DrDeuteron 2 жыл бұрын
SO(4)
Quaternions EXPLAINED Briefly
17:51
Mathoma
Рет қаралды 308 М.
Quaternions: Extracting the Dot and Cross Products
18:49
Mathoma
Рет қаралды 26 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Complex Numbers as Matrices
16:25
Mathoma
Рет қаралды 67 М.
SLERP (Quaternions)
22:02
EgoMoose
Рет қаралды 54 М.
How quaternions produce 3D rotation
11:35
PenguinMaths
Рет қаралды 99 М.
10 mins GameDev tips - Quaternions
10:12
sociamix
Рет қаралды 114 М.
2D Rotations and Complex Exponentials
19:19
Mathoma
Рет қаралды 20 М.
Euler vs Quaternion - What's the difference?
8:49
Class Outside
Рет қаралды 49 М.
Euler (gimbal lock) Explained
8:07
GuerrillaCG
Рет қаралды 1,4 МЛН
Fantastic Quaternions - Numberphile
12:25
Numberphile
Рет қаралды 1 МЛН
A Swift Introduction to Geometric Algebra
44:23
sudgylacmoe
Рет қаралды 894 М.