I am studying robotics as an undergraduate. One of the things we’re doing is rotational matrices. As a general principle I understand them, and if given a point in A I can find the given point in B with a rotational matrix. However, as an exercise for my own deeper understanding I want to derive a rotational matrix. I mostly understand how the common rotational matrices X,Y,Z are determined, but not entirely. I have this image below, and I want to design a rotation matrix from the (x1, y1, z1) frame to the (x2, y2, z2) frame. I’d really like some help with this topic. Make note: This is not a school assignment. I really want to understand how to do this. Thanks!