Assume that a formula for b hat(or y hat) using normal equation is already derivated.
Method 1.
Method 2.
t = ||y|| * cos theta
t / ||u|| = Indicating how many times the vector u must be multiplied to make the vector y hat. = scalar for making u to y hat