# Showing a relation is an equivalence relation on $\mathbb {N}$ or $\mathbb {R}$

I have an exercise that consists of 2 parts that I don't really know how to prove.

Consider the relation $$\mathcal R$$ on $$\mathbb {N}$$ defined as follows: for all $$a, b$$$$\mathbb {N}$$, a$$\mathcal R$$b if there exist $$m, n$$$$\mathbb {N}$$\{0} such that $$am^2$$ = $$bn^2$$ . Show that $$\mathcal R$$ is an equivalence relation. Show that the set $$\mathbb {N}$$/$$\mathcal R$$ is infinite.

Consider the relation $$\mathcal Q$$ on $$\mathbb {R}$$ defined as follows: for all $$x, y$$$$\mathbb {R}$$, x$$\mathcal Q$$y if there exist $$r$$$$\mathbb {R}$$\{0} such that $$x = yr^2$$ . Show that $$\mathcal Q$$ is an equivalence relation. How many elements are there in $$\mathbb {R}$$/$$\mathcal Q$$?

So I've been reading my script and I know that an equivalence relation is a relation that is reflexive, symmetric and transitive. For the first task, it seems somewhat intuitive that this is an equivalence relation. But I'm struggling with proving this mathematically correct.

• Reflexivity and symmetry are straightforward. Prove transitivity. Sep 29, 2020 at 9:45
• @Berci I thought symmetry and reflexivity were straightforward. I've seen the proofs for some examples. I just never know if it's "enough" sometimes since I don't think I'm really proving anything most of the time, just rearranging some variables. Sep 29, 2020 at 9:47
• Yes, often rearranging the variables and exchanging the two sides of an equation does give a valid proof. Sep 29, 2020 at 9:49

Note that $$a \cdot 1^2 = a \cdot 1^2$$, so $$a \mathcal R a$$.

If $$a \mathcal R b$$, then $$\exists m, n \in \Bbb N$$ such that $$am^2=bn^2$$, so $$bn^2 = am^2$$ and $$b \mathcal R a$$.

If $$a \mathcal R b, b \mathcal R c$$, then $$\exists m, n, k, t \in \Bbb N$$ such that $$am^2=bn^2, bk^2=ct^2$$, so $$a(mk)^2=b(nk)^2 = c(nt)^2$$ and $$a \mathcal R c$$.

Note that if $$p, q$$ are distinct primes, $$pm^2 = qn^2$$ is not possible (because an odd power of $$p$$ divides the left-hand side but an even power of $$p$$ divides the right-hand side), so $$\mathcal R$$ has infinitely many different equivalence classes.

A similar proof shows that $$\mathcal Q$$ is an equivalence relation on $$\Bbb R$$. Any positive number is a square in $$\Bbb R$$, so $$x \mathcal Q y \iff x \text{ and } y \text{ have the same sign}$$ and $$\mathcal Q$$ has three equivalence classes.

• Thanks for the answer! That helped a lot! Just a quick question about the second exercise. What do you mean with Q having three equivalence classes? Sep 29, 2020 at 12:39
• Note that $e \mathcal Q \pi$ because $e(\sqrt{\frac {\pi}{e}})^2=\pi$. Does that help you see when two real numbers are $\mathcal Q$-equivalent to one another? Sep 30, 2020 at 0:05
• So since they cancel out , this works for any real number in $\mathbb {R}$ Sep 30, 2020 at 8:45
• @23408924 Try it for $e$ and $- \pi$. Sep 30, 2020 at 9:13