Solution:
[x1] = [cos(theta)cos(phi)]
[y1] = [sin(phi)cos(theta)]
[z1] = [-sin(theta)]
[x2] = [sin(theta)cos(alpha)cos(phi) + sin(alpha)sin(phi)]
[y2] = [sin(theta)sin(phi)cos(alpha) - sin(alpha)cos(phi)]
[z2] = [cos(alpha)cos(theta)]
where theta=rotation around x-axis, phi=rotation around y-axis and alpha=rotation around z-axis.
Bonus Answer:
If (x3,y3,z3) is a different vector ON the plane perpendicular to (x1,y1,z1), then it takes this form:
[x3] = [sin(phi)sin(theta)cos(alpha) - sin(alpha)cos(theta)]
[y3] = [sin(phi)sin(theta)sin(alpha) + cos(alpha)cos(theta)]
[z3] = [sin(phi)cos(theta)]
Detailed Explanation:
(I am referencing UK matrix definitions, which may differ from US conventions where matrices are typically read backwards. The results remain consistent, only the explanation varies.)
Imagine your initial plane being flat on a table, representing the x-y plane. The z-axis extends perpendicularly out of the page. By rotating a degrees around the x-axis, b degrees around the y-axis, and c degrees around the z-axis, you can visualize the transformation.
Consider the vectors (x1,y1,z1) as (1,0,0) rotated by angles a,b,c in sequence. Similarly, (x2,y2,z2) represents (0,0,1) under rotations a,b,c respectively. To obtain another vector within the same plane orthogonal to (x1,y1,z1), apply the rotation transformations on (0,1,0).
The following matrices depict rotations around the x-axis, y-axis, and z-axis, with c indicating cosine of the angle and s depicting sine of the angle:
[1 0 0]
[0 c -s]
[0 s c]
[c 0 s]
[0 1 0]
[-s 0 c]
[c -s 0]
[s c 0]
[0 0 1]
To complete the transformation, sequentially apply these matrices (reverse order for US convention):
Final matrix = [cos(c) -sin(c) 0] [cos(b) 0 sin(b)] [ 1 0 0 ]
[sin(c) cos(c) 0] [ 0 1 0 ] [ 0 cos(a) -sin(a)]
[0 0 1] [-sin(b) 0 cos(b)] [ 0 sin(a) cos(a)]
= [cos(b)cos(c) (sin(a)sin(b)cos(c) - sin(c)cos(a)) (sin(b)cos(a)cos(c) + sin(a)sin(c))]
[(sin(c)cos(b)) (sin(a)sin(b)sin(c) + cos(a)cos(c)) (sin(b)sin(c)cos(a) - sin(a)cos(c))]
[-sin(b) (sin(a)cos(b)) (cos(a)cos(b))]
Multiplying this resultant matrix by the vectors yields the solutions presented above.