Previous | Next --- Slide 23 of 29
Back to Lecture Thumbnails
haojun

I think it would be av+bu+u x v.

Haboric

@haojun, you are correct. Professor Keenan mentioned in class that this was a typo. It should be $$(a, \mathbf{u})(b, \mathbf{v}) = (ab - \mathbf{u}\mathbf{v}, a\mathbf{v} + b\mathbf{u} + \mathbf{u} \times \mathbf{v})$$

keenan

Yes, it's a typo. Apologies!

Misaka-10032

I'm confused about the last equation

$$ uv = u \times v - u \cdot v $$

$u \times v$ is vector, $u \cdot v$ is scaler, how do a vector be subtracted by a scalar?

Update: I think I got it. Take $u$ and $v$ as quaternion with 0 in the scalar dimension. Then both left and right side of the equation are quaternions.

stutiRastogi

@Misaka-10032 Your update is the explanation, because for R3 we have 0 in scalar.

I am confused why the scalar part of the result is $ab - \textbf{uv}$ and not $ab + \textbf{uv}$. Seems silly, but I can't figure out where the negative came from :(

keenan

@Misaka Yes, exactly. When we write $u \times v - u \cdot v$ we mean a quaternion with imaginary part $u \times v$ and real part $u \cdot v$. More formally, the reason we can add these two quantities is that $u \times v$ is a quaternion with zero real part, and $u \cdot v$ is a quaternion with zero imaginary part.

If you like thinking in terms of code, you can imagine you have a quaternion class that stores four components, but of course some of them can be zero. For instance in C++ you might write

struct Quaternion {
   double s; // scalar part
   Vector3D v; // vector part
   Quaternion operator*( Quaternion p )
   {
      Quaternion q = *this;
      Quaternion qp;
      qp.s = q.s*p.s - dot(q.v,p.v);
      qp.v = q.s*p.v + p.s*q.v + cross(q.v,p.v);
      return qp;
   }
}

At this point the expression on the slide is basically like saying

Quaternion u, v, uv;
u.s = 0; u.v = Vector3D(1,2,3); // some arbitrary values...
v.s = 0; v.v = Vector3D(4,5,6);
uv.s = -dot(u,v); uv.v = cross(u,v);
return u*v - uv; // should be equal to zero 

Another way of looking at it is to imagine that a scalar is always a quaternion with zero vector component, and a vector is always a quaternion with zero scalar component. No such thing as real numbers or 3-vectors. :-)

keenan

@Stuti That's simply the way it works out, if you start from Hamilton's famous rule $i^2 = j^2 = k^2 = ijk = -1$. (Maybe you should try it: multiply two imaginary quaternions in components and see what happens! :-))

stutiRastogi

Worked it out, and got it finally! Thank you :)

keenan

Great!