In geometry, a position or position vector, also known as location vector or radius vector, is a Euclidean vector that represents the position of a point P in space in relation to an arbitrary reference origin O. Usually denoted x, r, or s, it corresponds to the straightline distance from
O to P. $r =\vec{OP}$
In the above figure O is the origin and P is any point in the space. is the position vector which represents the distance as well as the direction of the point from the origin O.

Vector can be defined for those quantities which have both magnitude and direction. In other words, all those quantities which have a particular direction along with some magnitude are called as vector quantities. For instance acceleration, velocity, force and displacement are vector quantities. Scalar quantity has magnitude but not direction. Speed, time and distance etc are Scalar quantities.
If $P (x_{1},y_{1})$ is the point in 2D then the position vector of P is given by:
$\vec{OP}= x_{1} \hat{i} +y_{1} \hat{j}$
Or we can also write this as $\vec{OP} = (x_{1},y_{1})$
In 3D the position vector of point $P(x_{1}, y_{1}, z_{1})$ is given by:
$\vec{OP}= x_{1} \hat{i} + y_{1} \hat{j} + z_{1} \hat{k}$
or
$\vec{OP}= (x_{1} , y_{1} ,z_{1})$
Let a figure below:
Let consider a figure of vector position below,Formula of vector positions are,
$\vec{PQ} = \vec{OQ}  \vec{OP}$
$\vec{PQ} = (x_{2} \hat{i} + y_{2} \hat{j} +z_{2}\hat{k}) (x_{1} \hat{i} + y_{1} \hat{j} +z_{1}\hat{k})$
$\vec{PQ} = (x_{2}x_{1}) \hat{i} +(y_{2} y_{1}) \hat{j} + (z_{2} z_{1}) \hat{k}$
To write the rectangular coordinate in terms of spherical coordinate we have following rule:
$x = rsin \theta cos \phi$ , $y = rsin \theta sin \phi$ and $z= rcos \theta$
Hence the position vector in spherical coordinate is given by:
$\vec{OP}$ = $<rsin \theta cos \phi$ , $rsin \theta sin \phi$, $rcos \theta>$
As we studied above the position vector of points are given by
Let points $P(x_{1}, y_{1}, z_{1})$
$\vec{OP} = (x_{1} , y_{1} ,z_{1})$
Here we are going to learn how to find position vector:
Lets make an example: The position vector of a point P (2,3, 5) is written as:
$\vec{OP}$ = (2 , 3 , 5)
From the above formula $\vec{PQ} = (x_{2}x_{1}, y_{2}y_{1}, z_{2}z_{1})$:
Find the position vector of a line joining points P(4,1,3) and Q(4,5,1)?
$\vec{PQ}$ = (44, 5(1), 13)
$\vec{PQ}$ = (44, 5(1), 13)
$\vec{PQ}$ = (0, 6,4)
Example 1:
Let a point P(4,6,3) Find the position vector?
Let a point P(4,6,3) Find the position vector?
Solution:
Given point P(4,6,3)
The position vector of it is:
$\vec{OP} = (4, 6, 3)$
Example 2:
Let two points P(6, 2, 4) and Q(1, 0, 1) Find the position vector of line PQ?
Let two points P(6, 2, 4) and Q(1, 0, 1) Find the position vector of line PQ?
Solution:
Given points P(6, 2, 4) and Q(1, 0, 1)
The position vector of PQ is:
$\vec{PQ} = (x_{2}x_{1}, y_{2}y_{1}, z_{2}z_{1})$
$\vec{PQ} = (16, 0(2), 1(4))$
$\vec{PQ} = (5, 2, 3)$
Example 3:
Let two points P(4, 3, 6) and Q(2, 0, 6) Find the position vector of line PQ?
Let two points P(4, 3, 6) and Q(2, 0, 6) Find the position vector of line PQ?
Solution:
Given points P(4, 3, 6) and Q(2, 0, 3)
The position vector of PQ is:
$\vec{PQ} = (x_{2}x_{1}, y_{2}y_{1}, z_{2}z_{1})$
$\vec{PQ} = (24, 03, 3(6))$
$\vec{PQ} = (2, 3, 3)$