If you are attaching the vector to a point, you actually need to find two separate results: the new point the vector will be attached to after rotation, and the new orientation of the vector. If we call the position vector of the point the vector is attached to p, and the vector v, then these can be combined into getting the new position of the position vector p + v.
If you have the two rotation matrices X (some rotation about the x-axis) and Y (some rotation about the y-axis), then to get the new position, we just find YX(p + v) = YXp + YXv.
A rotation about one axis in 3-space is just a rotation in 2-space along with making sure nothing happens in the third dimension. Ie., a rotation about the x-axis is actually a rotation in the yz-plane where we make sure nothing happens to the x information.
A rotation matrix for a plane looks like
R(\theta) = \begin{pmatrix}<br />
\cos\theta & -\sin\theta\\<br />
\sin\theta & \cos\theta\\<br />
\end{pmatrix}
The identity transformation leaves all values the same. For 3-dimensional Euclidean space with the usual basis the identity is
\begin{pmatrix}<br />
1 & 0 & 0 \\<br />
0 & 1 & 0\\<br />
0 & 0 & 1\\<br />
\end{pmatrix}
which is just the ordered list of basis vectors. We want to the y and z basis vectors, but leave the x basis vector the same, so we replace the lower right hand block, the identity for vectors in the yz-plane, with the rotation matrix R(\theta) above adjusted to rotate in the right-handed orientation (the old matrix rotates counterclockwise because we usually talk about rotations of some angle "from the positive x-axis". In 3 dimensions, we usually refer to clockwise rotations about an axis, so the angles are negated, which only affects the odd function sine).
<br />
\begin{pmatrix}<br />
1 & 0 & 0 \\<br />
0 & \cos\theta & \sin\theta\\<br />
0 & -\sin\theta & \cos\theta\\<br />
\end{pmatrix}<br />
For rotation about the y-axis, or rotation in the xz-plane, we replace the 4 values corresponding to the identity block for the xz-plane with the rotation matrix (see the matrix like a torus, the screen of an Asteroids game).
<br />
\begin{pmatrix}<br />
\cos\theta & 0 & -\sin\theta \\<br />
0 & 1 & 0\\<br />
\sin\theta & 0 & \cos\theta\\<br />
\end{pmatrix}<br />
To rotate your example by 45 degrees about the x-axis, then 45 degrees about the y-axis, we would first apply the transformation
<br />
\begin{pmatrix}<br />
\frac{\sqrt{2}}{2} & 0 & -\frac{\sqrt{2}}{2} \\<br />
0 & 1 & 0\\<br />
\frac{\sqrt{2}}{2} & 0 & \frac{\sqrt{2}}{2}\\<br />
\end{pmatrix}<br />
and then the transformation
<br />
\begin{pmatrix}<br />
1 & 0 & 0 \\<br />
0 & \frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2}\\<br />
0 & -\frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2}\\<br />
\end{pmatrix}<br />
as described above.