# understanding quaternions - spatial rotations

I would like to know if my understanding about quaternions is correct please:

lets say you have a vector in 3d space. You could rotate the x,y and-z frame on a fixed point so that it is parallel with this vector (source first sentences: http://www.u.arizona.edu/~pen/ame553/Notes/Lesson%2009.pdf).

Once this is done you know how much you rotated (theta) the vector and theta represents the eules axis. Quaternions give a simple way to encode this axis–angle representation in four numbers.

And this is what the quaternion of a vector is.

Is this correct?

A rotation of angle $\theta$ about axis $\vec v$ ($|\vec v| = 1$) can be represented by either the quaternion $q = \cos\left(\frac \theta 2\right) + \vec v \sin\left(\frac \theta 2\right)$ or the quaternion $-q$.
To rotate the vector $\vec w$ using the transformation represented by $q$, do $q\vec wq^{-1}$. Formally, the nonzero quaternions can act on vectors as rotations.