Rotation matrix mapping one vector to another

301 Views Asked by At

In one of the online lectures, the instructor mentioned about the rotation matrix that maps a vector $g$ to another vector $e$ (assuming unit vectors) and it's written as:

$R = I_{3\times3} + 2eg^T + \frac{1}{1 + e^Tg}(e + g)(e + g)^T$

This looks very similar to some form of Rodrigues' rotation formula, but I'm struggling to figure out how to derive the above rotation formula from Rodrigues' formula, e.g., what's the rotation axis and the angle. Any hint/explanation with simple algebra/geometric intuition would be appreciated!