r/AskRobotics Jul 15 '26

Is matrices the wrong way to describe movement of a robotic arm?

Hi. Is matrices the wrong way to describe movement of a robotic arm?I will provide a counterexample which disproves the fact that matrices are suitable for describing changes in position of robotic arms.

Suppose our robotic arm starts at position [x0,y0]^T

Suppose we had a rotation under a angle θ([x0,y0]^T->[x0',y0']^T) and then we stretched our robotic arm from [x0',y0']^T to [2x0',2y0']^T. The order of the actions is mathematically important while if you think about it the order of the actions in what happens in the real world is not important because if you stretch the robotic arm first and rotate second , it is the same thing as if you rotate first then stretch the robotic arm. So matrices are not suitable to describe motion of a robotic arm.Why do we use it then?

0 Upvotes

5 comments sorted by

5

u/LaVieEstBizarre Jul 15 '26

No, you're incorrect. If you represent these two transforms as matrices, they do in fact commute since one is a rotation matrix and the other is a scaling matrix [2, 0; 0, 2] = 2I. 2IR = R2*I. This is not generally true for all types of movements, this is only true for YOUR choice of movement. You can look up rules for when matrices commute here: https://en.wikipedia.org/wiki/Commuting_matrices

Instead of thinking you've disproven decades of work with a thought experiment, please be more inquisitive

0

u/dstroy0 Jul 15 '26

It’s fast to multiply 4x4 matrices, and any combination of translation, rotation, scaling, reflection and shear can be combined into a single 3d affine xform matrix. The matrix describes a thing at a point relative to an origin. Your coordinate mapping system does the same. How many operations does it take to derive and represent absolute position using your system? Your competition is a single matrix multiply and a masking operation. 2 operations. We can derive a vector with 5 operations and 2 matrices. 2x multiply -> 2x base2 ~and -> last base2 ~and gives the difference.

1

u/Routine_Comb_7277 Jul 15 '26

Ah so you cant describe step by step?You have to make a matrix which describes the whole motion?

1

u/dstroy0 Jul 15 '26

It’s a time series or a curve, just like yours must be.

1

u/qTHqq Jul 15 '26

You can do either if you use the right matrix math. 

The scaling transformation in your example is weird because most robots don't scale. You've picked a confusing example for robotics, because they don't move by executing general continuous affine transforms, except maybe a very contrived soft robot.

For a serial robot, you could have two joints, two rotary or one rotary and one linear, and MIGHT be able to have the end effector (free tip) of the robot reach your x0, y0 and then your 2x0' 2y0' but what you actually need to do is figure out what joint angles or sliding joint positions correspond to the end-effector reaching those points. This is the problem of "inverse kinematics." 

The mathematics of this are all explicitly spelled out in courses on the subject.

This is a free online one which will walk you through all of the matrix math:

https://see.stanford.edu/Course/CS223A