TITLE: How do I know if basic algebra works?
QUESTION [8 upvotes]: This may be a very silly question, but I've been wanting to ask it for a while so here goes. I've been reviewing basic high school math in preparation for analysis, and I find myself questioning a lot of things - especially basic algebra - to the point I'm going a little mad.
For instance, polar coordinates can be related to rectangular coordinates like so: $x=r \cos\theta$, $y=r \sin\theta$. So, $x^2+y^2=1$ can be rewritten as $r^2=1$, so $r=1$. And surely enough, it's the same graph. But why does this work? I know it algebraically makes sense but it just feels a bit odd to me. I guess a broader version of this question is: I've been taught that if something is algebraically derived/true, it must produce the right answer. But how do I know that other than saying, "if you broke zero algebraic rules, it holds." The manipulation of these variables is just odd to me. Maybe this feeling will pass.
Another example:
$$\iint 1-x^2-y^2\,dx\,dy = \iint 1-r^2\,rdr\,d\theta $$
This algebraically holds since $x^2+y^2=r^2$ but how do I know it works other than saying "algebra works"?
I'm definitely overthinking this but it keeps nagging me.

REPLY [4 votes]: You've got two good answers. Here are some points about polar coordinates that seems not to be addressed, but that consistently bother at least some students in ways that sound similar to your doubts.
The equations $x = r\cos\theta$ and $y = r\sin\theta$ define a mapping from the plane to itself, which we might express
$$
P(r,\theta) = (x, y) = (r\cos\theta, r\sin\theta).
$$
Often we speak of mapping "the $(r, \theta)$ plane" to "the $(x, y)$ plane".
These coordinates are not intrinsically associated to the planes, but in the context of working with polar coordinates it's efficient to fix the meanings of all four variables. Note carefully that $(r, \theta)$ are Cartesian coordinates for the domain of $P$, and are polar coordinates for the $(x, y)$ plane.
The mapping $P$ is surjective or onto: For every point $(x, y)$, there exists a pair $(r, \theta)$ such that $(x, y) = P(r, \theta)$. Loosely, every point in the plane has a set of polar coordinates.
By contrast, the mapping $P$ is not injective, or not one-to-one: There exist distinct sets of polar coordinates that map to (or "represent") the same $(x, y)$. It's a good exercise to work out precisely when two points in the $(r, \theta)$ plane map to the same $(x, y)$, partly to review trigonometry, and partly because I think this underlies the unease motivating the question.
Answer:

 We have $P(0, \theta) = (0, 0)$ for all real $\theta$, while if $r \neq 0$, then $P(r, \theta) \neq (0, 0)$ for all real $\theta$. For every integer $k$ and every real $r$, we have $P(r, \theta) = P(r, \theta + 2k\pi)$ and $P(r, \theta) = P(-r, \theta + (2k+1)\pi)$. Conversely, if $P(r_{1}, \theta_{1}) = P(r_{2}, \theta_{2})$, then either $r_{1} = r_{2}$ and $\theta_{2} - \theta_{1} = 2k\pi$ for some integer $k$, or $r_{1} = -r_{2}$ and $\theta_{2} - \theta_{1} = (2k+1)\pi$ for some integer $k$.


Why should this be bothersome? For one thing, the equations $r^{2} = 1$ and $r = 1$ are not equivalent for real numbers $r$. Well then, why should they define the same locus, the unit circle $x^{2} + y^{2} = 1$, in the $(x, y)$ plane? Because without constraints on the angle $\theta$, each of the lines $r = 1$ and $r = -1$ "traces out under $P$" the entire circle. (To be more formal, we can express this using images of sets under a mapping.)
It may be instructive to sketch the images under $P$ of segments of the form $(r, \theta)$ with $r = 1$ and $0 \leq \theta \leq \pi/2$, or with $r = -1$ and $0 \leq \theta \leq \pi/2$. We get visibly-different curves: It's only when we let the angle range over an interval of length at least $2\pi$ that the difference ceases to be visual, and we recover the entire locus $x^{2} + y^{2} = 1$.
Another worrisome property of polar coordinates arises if we ask, "What are the polar coordinates of a point $(x, y)$?" This is a sneaky trap: By using the article the, the question implicitly suggests each point $(x, y)$ has unique polar coordinates, when in reality every point $(x, y)$ has infinitely many distinct sets of polar coordinates.
My suspicion is, if you (beginner, or future reader) closely examine your unease with polar coordinates, "sketchy" claims will originate with different sets in the $(r, \theta)$ plane that map to the same set in the $(x, y)$ plane when you're trying to discern something by looking only at the $(x, y)$ plane.
More generally, understanding the polar coordinates mapping in detail clarifies abstract concepts, including images and preimages of sets, surjectivity and injectivity of mappings, and one-sided inverses; this example justifies giving these properties special names and expending time on them in analysis and elsewhere. (In fact, the humble polar coordinates mapping concretely touches on more subtle concepts, such as covering maps and factoring one mapping through another, lifting and sections of fibre bundles, simple-connectedness, and de Rham cohomology!)