A scalar is a quantity expressed by a single real number. An example of a scalar is length . A scalar has magnitude, or the size of a mathematical object. A vector is a quantity that is defined by multiple scalars. In addition to magnitude, a vector also has a direction.
For example if we are to find the magnitude of vector AB where the initial point A is (2, 2) and the end point B is (6, 4).
Substituting the values into our distance formula:
AB = √[(6-2)^2 + (4-2)^2 ]= √[4 2 + 2 2] = √[16 + 4] = √20
The magnitude/size of AB = 4.72 which is known as scalar as we do not know direction of AB yet.
To find the direction of a vector AB we measure the angle that the vector makes with a horizontal line using the formula:
tanx = (y2 – y1)/(x2 – x1)
= (2-4)/(2-6) = -2/-4
x = 26.57 degrees , finally direction of AB is 26.57 degrees and magnitude of sqrrot(20)