To convert from rectangular coordinate (x, y) to polar coordinate (r, θ).
r is given by the square root of the sum of the squares of the rectangular coordinate.

and θ is given by the arctan of the ratio of y to x.

Example:
To convert rectangular coordinate (3, 4) to polar coordinate

Therefore, rectangular coordinate (3, 4) = polar coordinate (5, 53.13°)