If θ is the angle which the straight line joining the points (x1,y1) and (x2,y2) subtends at the origin, prove that tan θ=x2y1−x1y2x1x2+y1y2 and cos θ=x1x2+y1y2√x21+x21√x22+y22
Let A(x1,y1) and B(x2,y2) be the given points.
Let O be the origin.
Slope of OA =m1=y1x1
Slope of OB =m2=y2x2
It is given that θ is the angle between lines OA and OB.
∴tan θ=m1−m21+m1m2
=y1x1−y2x21+y1x1×y2x2
⇒tan θ=x2y1−x1y2x1x2+y1y2
Now,
As we know that cos θ=√11+tan2 θ
∴cos θ=x1x2+y1y2√(x2y1−x1y2)2+(x1x2+y1y2)2
⇒cos θ=x1x2+y1y2√x22y21+x21y22+x21x22+y21y22
⇒cos θ=x1x2+y1y2√x21+y21√x22+y22