We have two vectors, v and w.
a) We have to find the projection of v on w (projv w).
We can draw a projection of a vector over another as:
We can calculate the projection as:

This means that the projection of a vector v over w is equal to the scalar projection of v over w, equal to the modulus of v times the cosine of the angle between the two vectors, times the unitary vector in the direction of w.
We can rearrange the expression as:

This expression let us calculate the projection from the coordinates given as:


The projection is (14,14) which can be decomposed as 14i + 14j.
b) We have to decompose v into two vectors: one parallel to w and the other orthogonal to w.
The vector parallel to w is the projection of v onto w, so we already know that it is 14i + 14j.
An orthogonal vector will be the projection of v onto an orthogonal vector to w.
We then have to find an orthogonal vector to w in the plane. We know that the dot product of orthogonal vectors is equal to 0.
So if we know a vector u = (a,b) it will be ortogonal if u * v = 0:

Then, if we define a = -1 we will get b = 1, and u = (-1,1) that is orthogonal to vector w.
Now, we can calculate q, the projection of v onto u:
![undefined]()