Hey there! Sign in to join this conversationNew here? Join for free
 You are Here: Home >< Maths

# Help with Matlab Watch

1. Hi everyone. I am doing matlab as a module for my first year at Uni. I am stuck on the following tutorial question.

A quaternion Q is a number with the following form
Q = a + bI + cJ + dK where
I 2 = J 2 = K2 = -1, IJ = K, JK = I , KI = J , JI = -K, KJ = -I , IK = -J
It can be proved that a quaternion can be represented by the complex matrix, i.e.
Q= a bI cJ dK =[a + bi c+di]
[-c + di a-bi]
where i = squareroot(-1).

The MATLAB function you develop should have two quaternions as arguments
and should multiply them together. The quaternions should be given in the form
v = [a1 b1 c1 d1] and v = [a2 b2 c2 d2] . Your function should take the
two quaternions expressed as vectors and express each of them as complex
matrix. Then it multiplies the two matrices together and output the product as a
vector of the form v = [a b c d ] . To test the function determine the product
of

Q1 = 3+ 4I - 2J + 5K and Q2 = 7 + 2I - 3K

Using these two quaternions, show that the multiplication is not commutative,
i.e Q1Q2 is not equal to Q2Q1 . Note that although you have only shown this for two specificquaternions, it is generally true.

Please reply back asap. Many thanks

Reply
Submit reply
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: December 1, 2010
Today on TSR

### Degrees to get rich!

... and the ones that won't

### Cambridge interviews pour in...

Discussions on TSR

• Latest
• ## See more of what you like on The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

• Poll
Useful resources

## Make your revision easier

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams

Can you help? Study help unanswered threads

## Groups associated with this forum:

View associated groups
Discussions on TSR

• Latest
• ## See more of what you like on The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

• The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.