I have an $m \ge5$ dimensional vector $x$. How i can construct a rotation matrix $A$ s.t: $x \cdot A$ would be a vector rotated by $\theta$ angle. This is trivial for 2 dimensions, but what for this case? For instance will it work if A is this: $A = \begin{bmatrix} cos \theta & -\sin\theta&0&0&0 \\ \sin\theta&-\cos\theta&0&0&0\\ 0 & 0&cos \theta & -\sin\theta&0\\ 0 & 0&sin \theta & cos \theta&0\\ 0&0&0&0&1\\ \end{bmatrix}$
and i work in 5 dimensions? This matrix i assume that is says rotate with respect to the first plane of the two first dimensions by $\theta$ then rotate again with the same $\theta$ the other two. But what about the last one? Also what if i want to combine dimension 1 and 4 in order to rotate with respect to this plane?
A rotation in the plane $\mathbb{R}^2$ is determined by a fixed point and a rotation angle around that point. A rotation in 3-dimensional space $\mathbb{R}^3$ is determined by a fixed line and a rotation angle around that line. The common generalization of this is that a rotation in $m$-dimensional space is determined by a fixed $m-2$ dimensional affine subspace and a rotation angle around that subspace. So just specifying a vector and a rotation angle is not enough information to determine the rotation. What you need to specify is the fixed subspace and the rotation angle.
Also, you ask for a rotation of the form $x \cdot A$, and this means that the fixed $m-2$ dimensional subspace is a linear subspace $V$. Let's say that you specify $V$ and the rotation angle $\theta$. Here's how to derive the matrix $A$.
Let $e_1,\ldots,e_m$ be the standard basis for $\mathbb{R}^m$ (written as column vectors). Let $b_1,\ldots,b_m$ be any orthonormal basis for $\mathbb{R}^m$ (again written as column vectors) such that $V = Span\{b_3,\ldots,b_m\}$ (however $V$ is specified you'll have to compute this basis $b_1,\ldots,b_m$, perhaps by the Gram-Schmidt process). Putting this basis in the columns of a matrix $M$ you get a linear transformation that maps the $n-2$ dimensional subspace $Span\{e_3,\ldots,e_m\}$ to the subspace $V$. Let $R$ be the $m \times m$ matrix that you get from the identity matrix by replacing the upper left $2 \times 2$ submatrix by the standard rotation matrix $(\cos(\theta),\sin(\theta);\sin(\theta),\cos(\theta))$, so this $R$ represents the rotation of angle $\theta$ with fixed subspace $Span\{e_3,\ldots,e_m\}$.
Then the matrix you want is $$A = M R M^{-1} $$ Geometrically this works because this formula says: map $R$ back to $Span\{e_3,\ldots,e_m\}$, rotate around that by $\theta$, and them map $Span\{e_3,\ldots,e_m\}$ back to $R$; the result is a rotation of angle $\theta$ around $R$.