If your vectors are vectors that make up a rotation matrix, you can use quaternions to rotate all the vectors.
for example:
rot_matrix = (x_vec, y_vec, z_vec, om.MPoint.kOrigin)
# you want to rotate x_vec to x_vec_target and apply that too the other vectors to rotate the matrix
offset_quat = x_vec.rotateTo(x_vec_target)
# apply the rotate the matrix using quaternions
rot_mat = om.MTransformationMatrix(rot_mat).rotation(asQuaternion=True)
result_rot = rot_mat * offset_quat
# get the matrix
result_matrix = result_rot.asMatrix()
from result_matrix, you can get the x_vec, y_vec, and z_vec rotated