The angle theta between two vectors #u# and #v# is given by the formula of the dot product:
#vecu*vecv=|u||v|costheta#
Where #|u|# and #|v|# are the absolute values/magnitudes.
If #vecu = x_uveci+y_uvecj# and #vecv=x_v veci+y_v vecj#, then
#vecu*vecv=(x_uveci+y_uvecj)(x_v veci+y_v vecj)#
By the dot product, #veci*veci=vecj*vecj=1# and #veci*vecj=0#.
#:. vecu*vecv=x_ux_v+y_uy_v#
Now, the magnitude of a vector #veca=xveci+yvecj# is
#|veca|=sqrt(x^2+y^2)#
Which is basically the lenght of the vector.
#vecu*vecv=|u||v|costheta=>costheta=(vecu*vecv)/(|u||v|)#
#color(blue)( :. costheta = (x_ux_v+y_uy_v)/(sqrt(x_u^2+y_u^2)sqrt(x_v^2+y_v^2))#
This formula gives us the angle between two vectors #u# and #v#.
#vecu=4veci-1vecj#
#vecv=20veci-5vecj#
#x_ux_v+y_uy_v=4*20+(-1)(-5)=80+5=85#
#|u|=sqrt(16+1)=sqrt17#
#|v|=sqrt(400+25)=5sqrt85#
#costheta=85/(5sqrt17sqrt85)=1/sqrt5#
Therefore,
#theta=arccos(1/sqrt5) ~~ 1,107 " rad"#