# Unity Quaternion Multiplication by Vector3

Hi guys and of course thanks before anything. I am starting to use Unity 3D in a professional environment, and I am facing a hard time trying to understand what is the goal behind multiplying a Quaternion by a Vector3 and what the result is. For example, I don understand why, in this code:

``````Vector3 idk = Quaternion.Euler(0, 45, 0) * transform.forward;
``````

my Vector3 idk results in (0.7, 0.0, 0.7). I have read in several places that when you do that, you are “rotating the vector by the quaternion”, but I simply don’t understand the value I get or the concept I am facing. Could someone please explain me a bit better or point me to a place where I can read in detail what is happening here, where I am lost? Unity docs focuses on multiplying Quaternions by Quaternions, and I get that part, but Quaternions * Vectors are right now really hard to understand. Thanks again, and have a good day.

Indeed, multiplication of a quaternion by a vector is how you apply a quaternion transformation to a vector. In this case, it seems like your transform.forward is `(1, 0, 0)` and you are rotating it by 45 degrees around the Y axis (either left or right). You end up with `(0.7, 0, 0.7)` because a vector of unit 1 rotated by 45 degree is the same as `(1 * cos(45), 0, 1 * sin(45))`. X and Z or the values getting modified and Y remains at zero because that is the axis we are rotating around. `cos(45) = sin(45) = 0.70716...`. I hope this helps explain what is going in this line of code.