To convert from polar to rectangular:
x=rcos theta x=rcosθ
y=rsin thetay=rsinθ
To convert from rectangular to polar:
r^2=x^2+y^2r2=x2+y2
tan theta= y/xtanθ=yx
This is where these equations come from:

Basically, if you are given an (r,theta)(r,θ) -a polar coordinate- , you can plug your rr and thetaθ into your equation for x=rcos theta
x=rcosθ and y=rsin thetay=rsinθ to get your (x,y)(x,y).
The same holds true for if you are given an (x,y)(x,y)-a rectangular coordinate- instead. You can solve for rr in r^2=x^2+y^2r2=x2+y2 to get r=sqrt(x^2+y^2)r=√x2+y2 and solve for thetaθ in tan theta= y/xtanθ=yx to get theta=arctan (y/x)θ=arctan(yx) (arctan is just tan inverse, or tan^-1tan−1). Note that there can be infinitely many polar coordinates that mean the same thing. For example, (5, pi/3)=(5,-5pi/3)=(-5,4pi/3)=(-5,-2pi/3)(5,π3)=(5,−5π3)=(−5,4π3)=(−5,−2π3)...However, by convention, we are always measuring positive thetaθ COUNTERCLOCKWISE from the x-axis, even if our rr is negative.
Let's look at a couple examples.
( 1)Convert (4,2pi/3)(4,2π3) into Cartesian coordinates.
So we just plug in our r=4r=4 and theta= 2pi/3θ=2π3 into
x=4cos 2pi/3=-2x=4cos2π3=−2
y=4sin 2pi/3=2sqrt3y=4sin2π3=2√3
The cartersian coordinate is (-2,2sqrt3)(−2,2√3)
(2) Convert (1,1)(1,1) into polar coordinates. ( since there are many posibilites of this, the restriction here is that rr must be positive and thetaθ must be between 0 and piπ)
So, x=1x=1 and y=1y=1. We can find rr and thetaθ from:
r=sqrt(1^2+1^2)=sqrt2r=√12+12=√2
theta=arctan (y/x)=arctan(1)=pi/4θ=arctan(yx)=arctan(1)=π4
The polar coordinate is (sqrt2,pi/4)(√2,π4)