I want to rotate the vector (1.1, 0.1, 0.1) to align with the vector (1, 0, 0), and in general I want the formula to rotate one vector onto another. I'm aware of the Rodriguez formula for rotating a vector, but for my case I'm doing an animation so I want to visualize the 3 rotations separately one at a time, so I'm just trying to use the basic 3 rotation matrices. Before I can do that, I need to find the 3 angles between the two vectors corresponding to the x, y, and z rotation matrices.
The formula I found was to get their dot product, divide by their magnitudes, and then take the inverse cosine of that value, and that gives you the angle between the two vectors that I can use to rotate them. Since I'm doing 3 rotations I thought it made sense to do that for just the x, y, and z portions of the vector so I can get the angles I need to rotate them in x, y, and z.
With edge cases like rotating to (1, 0, 0) it doesn't work for the y or z portions because they're 0 so the dot product is obviously 0, which means I only have an x rotation and I'm missing the y and z rotations. Additionally, the signs of the angles don't seem to be right. I get the same results whether the angle is 90° to the left or 90° to the right, but in that case I'd want the angle 90°, and 270°. I'm guessing this is because the cos^-1 function goes from pi to 0, but I'm not sure how to account for this.
This page seemed to give the answer closest to what I want and shows it is possible, but obtaining the angles is the part I'm having trouble with.