# Jacobian for Inverse Kinematics with quaternion of end effector

Quaternion has four parameters. Calculating Jacobian for inverse-kinematics, 3 positions and four quaternion parameters make Jacobian $7\times7$ instead of $6\times6$. How to reduce Jacobian to $6\times6$ when using quaternion?

• Can you explain, why you need exactly a 6x6 jacobian. – TobiasK Mar 6 '16 at 14:01
• @TobiasK thanks for your comment, Using Euler angles Jacobians are 6x6. So 7x7 matrix seems to have a redundant dimension. – ar2015 Mar 6 '16 at 23:32
• No there is no redunance. You can see it like this (not in a very mathematical way); euler gives you the possibility to calculate the orientation of an object but you are missing some functionality, like handling the gimbal lock. Therefore you can use another representation: the quaternions. Those guys are helping us handling the problems we have with euler but we need therefore one more Dimension within your calculation. If you do not need this extra functionality you can switch to euler before you calculate the jacobian, this is a pretty easy mathematical operation. – TobiasK Mar 7 '16 at 5:40
• You just have to know what each term means and how to use the matrix. The jacobian of a robotics is named after a jacobian matrix in mathematical. Including all partial derivates, nothing more nothing less... Its size is not relevant, you just have to make sure to use it in the right way – 50k4 Mar 8 '16 at 16:11

Jacobian does not have to be a square matrix. It is a matrix that maps joint velocities $\dot{q}$ to tool velocities $\dot{x}$ so its size is whatever fits with the two velocity vectors.
In your case, since the tool velocity vector is $\dot{x} \in \mathbf{R}^7$, a Jacobian will be $J \in \mathbf{R}^{7 \times 6}$, when your robot has $6$ DOFs.