# Matrix Algebra vs Trigonometry for Inverse Kinematics

What method is “better” for solving inverse kinematics for a robot arm: matrix algebra or trigonometry?

To define “better”:

• efficiency/performance vs memory usage
• generality (how well can it be adapted to different arm configurations)

I know trigonometry/geometric methods get very complicated when solving for more that a few DOF so matrix algebra would probably be the best solution there.

But for 2-3 DOF robot arms which method is preferred?

Update: As others have pointed out and more research has showed me, using matrix algebra compared to trigonometry for increase kinematics doesn’t affect performance. They are just different methods of setting up and solving the inverse kinematic equations. Once you solve the IK equations using either of these methods, it’s implemented the same way in the code. I think I prefer the matrix method for solving IK because it’s a little more general that trigonometry, it scales to more joints more easily, and I’m already using matrices for forward kinematics so it provides a better symmetry.

• upvote for making the effort to define what "better" means to you May 9 at 23:05
• I am not sure I completely understand the reason for your question. When computing inverse kinematics, you have a set of equations (in algebraic form or in matrix form) representing the robot configuration, and you have to solve for the joint angles. I have never seen an algorithm that can do that for a general case. So you use either approach to find the joint angles - but when implementing these into code, the method you used to determine the joint angle equations doesn’t matter. You work out the efficiencies after solving the equations. Jun 11 at 4:14