 # Math - Quaternion Multiplication (Part 2)

In this lecture we continued our exploration of multiplying two quaternions.

We found that we could reduce our previous polynomial expansion into an easy to read formula and in the process, discovered how both the dot and cross product of two vectors were originally used to help with quaternion multiplication.

We then looked at how to construct a 4x4 matrix for quaternion multiplication.

As a challenge, you were asked to try multiplying the quaternions:
(1 + 2i + 3j + 4k) (5 + 6i + 7j + 8k)

Of the three multiplication options we looked at; which did you use, and which is your favourite?

Hi there
found 0 at cross product, 65 at dot product, finally to obtain
60 + 16i + 22j + 28k

@Caval, great work attempting this challenge.
You are really close to the correct answer, but it looks like you made a mistake when working out the cross product.

Don’t be discouraged though. It’s a big calculation with a lot of moving parts, so it’s easy for minor mistakes to slip in.

Here are the complete calculations so you can double check them against your own:

Edit (30/01/2021):
The image above previously had an error in the final line.
The correct value for the real part is -60, not 60. Apologies for any confusion caused.

1 Like

Somehow I added the component of the cross product together to make zero, weird sub consciou reflex… I had no reason to do that since the output of cross product is a vector. Thanks for the correction

1 Like

Don’t worry, it happens to the best of us!

-60 + (12i, 30j, 24k) I got this and then I looked at your explanation to Caval, and I don’t get why 5-65 gives 60 and not -60. I might be having a brain fart. The rest I get.

Great spot @DefectiveButCaring, you’re absolutely right!
That looks like a typo on my part, so I must have messed up my LaTeX input when formatting the answer.

The final output should be -60 + (12i, 30j, 24k).

I’ve edited my post above to reflect this.

@garypettie Mistakes happen, I just thought I was missing something and I was lost. glad either way. Thanks for being around to help and such.

1 Like

here is my result:

I like this way of solving the best because, in my opinion, it needs the least amount of thinking. You can just put the numbers in this equation. Then you can just mechanically calculate it by following the rules that you did learn before.

1 Like

I got -60+(12i,30j,24k)

1 Like

The first method I have used is the matrix multiplication, and it was quite straightforward, the second method took me longer but now I kind of figure out how it works.

Not going through the first method, but now I see that it looks scary but it’s way easier than I thought

Here’s the results

[-60, 12i, 30j, 24k]

1 Like

Used both Matrix Multiplication and the Polynomial expansion formula
Both time q1q2 = -60 + (12i +30j + 24k)

By Matrix:

(1,2,3,4) * (5,-6,-7,-8) = 5,-12,-21,-32 = -60
(1,2,3,4) * (6,5,8,-7) = 6,10,24,-28= 12
(1,2,3,4) * (7,-8,5,6) = 7,-16,15,24 = 30
(1,2,3,4) * (8,7,-6,5) = 8,14,-18,20 = 24

1 Like

Did both. Answer: ( 60, 12i, 30j, 24k )

Ignoring the letters during the intermediary steps I get the same answer as everyone else does - but when I tried doing this including the i, j, k’s everything went wonky and none of the formulas matched (though i suppose this would ahve been corrected if I made the assumption that regardless of the order of variable multiplication (i.e.; jk vs kj) that everything was in the standard order (i.e; ijk). (Ironically when I tried to keep things consistant in terms of whether i, j, k was first I was getting inverse results on signs for all ij, jk, ki, etc. combinations).

To give a bit of an idea of what I was looking at:

Matrix:

5 -6i -7j -8k 1
6i 5 8k -7j 2i
7j -8k 5 6i 3j
8k 7j -6i 5 4k

Result:

5 -6i^2 -21j^2 -32k^2 70
6i 10i 24kj 32jk -40i
7j -16ki 15j 24ik 14j
8k 14ji -18ij 20k -4k

Using the dot + cross product formula:

16i 22j 28k 14ij -18ji 24ki -16ik 24jk -28kj
70 68i 62j 60k

It just seems a little strange to me after what was discussed last video. Being presented with the seeming contradiction it gets a bit hard to ignore. -60 + (12i; 30j; 24k)

q1q2 = 5 - 12 -21 -32 + (6 + 10 + 24 - 28)i + (7 - 16 + 15 + 24)j + (8 + 14 - 18 + 20)k
q1q2 = -60 + 12i + 30j + 24k

I don’t understand how we can ignore the letters of the cross product.

I can get to (3j x 8k - 4k x 7j) and that IS the x of the result but isn’t the j and k part of the value? How can these be ignored?

Mechanically I’m able to work thru it using the “simplified” formula method except for the above.

Upon reflection… I’ll try to answer myself: I suppose the i, j, and k are really just axis indicators, so they don’t really change the Value as I expected. We typically don’t have the x, y, and z in there either but know what they represent.