So suppose we have two vectors $v$ and $w$. We want to project $w$ onto $v$.
To do so this method makes sense: Make $v'$ just a vector in the same direction as $v$ with $\text{length} = 1$. Easily, $$v' = \frac{v}{\text{length} (v)} = \frac{v}{(v^T * v)^{.5}}$$
The denominator is the length because $(v^T * v)$ gives us the sum of each component squared, and then we take the square root of it.
So, $$\text{proj}_{v}(w) = (w v) * v'$$ The piece in the parenthesis gives us the length of $w$ onto vector $v$(because of dot product). Then the $v'$ gives us the direction. Are we taking the dot product of $(w v)$ with $v'$? If so, doesn't this just give us a number without a direction? If not, what operation are we doing with $(w v)$ and $v'$?
The following is what I keep reading online which also confuses me: $$\text{proj}_{v}(w) = \frac{(vw)}{v^Tv}v$$
So the numerator is the same, right? It's telling us the length of $w$ along the vector $v$. The denominator is weird though. So $v^Tv$ should be the length of vector $v$ squared, right? Shouldn't we need to take the square root of $v^Tv$ to get the length. The length will then be used to make the $v$ outside of our fraction a unit length vector, but we have length squared in this case. Why is that?