Define Rotation matrices for arbitrary dimension? I'm writing a graphical program and I want to ably rotation on shapes of arbitrary dimension , can some someone explain how to construct matrices for simple ,double... rotation , I don't need the entire mathematics behind it I just want to understand the pattern so that I can construct such matrices efficiently(without much work) in my program .
-is there anyway I can do that without using matrices
-can I project the matrices into a subspace(that exclude the plane of rotation) and then apply rotation .
 A: "The pattern" is that rotation matrices for $\Bbb R^n$ (I'm not counting mirror images, produced by reflections) are all orthogonal matrices with determinant 1.
It sounds like considering general rotations is not very practical for your purpose. However, if you just want to induce a rotation of $\theta$ radians in a particular plane, that is not hard to describe.
Suppose you have two unit length vectors $u,v\in \Bbb R^n$, and you want to rotate $u$ onto $v$'s position in their plane by rotating that plane $\theta$ radians. Extend $\{u,v\}$ to be a basis $\{u,v,b_3,b_4,\dots, b_n\}$ to be an orthonormal basis of $\Bbb R^n$. This can be done with the usual Gram-Schmidt algorithm.
Then the rotation that you are looking for is given by the matrix 
$$
\begin{bmatrix}\cos(\theta)&-\sin(\theta)&\textbf{0}&\\
\sin(\theta)&\cos(\theta)&\textbf{0}\\
\textbf{0}&\textbf{0}&I_{n-2}\end{bmatrix}
$$
where the bold zeros mean you are padding those areas with blocks of zeros of appropriate dimension, and the $I_{n-2}$ is the identity matrix with sides $n-2$. This matrix acts on column vectors from $\Bbb R^n$ by multiplication to produce the rotation.
If you would like to express it in the basis you started with, you would have to perform a change of basis on the matrix to bring it back.

Let $B_i=\begin{bmatrix}\cos(\theta_i)&-\sin(\theta_i)\\\sin(\theta_i)&\cos(\theta_i)\end{bmatrix}$ stand for this plane rotation we discussed. In general, for each rotation, there is going to be a basis in which the rotation looks like this:
$$
\begin{bmatrix}B_1&0&0&0&0\\
0&B_2&0&0&0\\
0&0&\ddots&0&0 \\
0&0&0&B_k&0\\
0&0&0&0&I_j
\end{bmatrix}
$$
I'm too lazy to make the zeros bold this time, so again they actually stand for more zeros than are there. They are padding out all of the space not used by the $B_i$ and the identity matrix $I_j$.
This is all good if you have a basis and you desire to rotate in the planes of pairs of basis elements. If you want to work in an arbitrary basis, you are going to have to perform a change of basis, and the matrix will lose this shape.
