Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Prove/Show that a number is square if and only if its prime decomposition contains only even exponents.

How would you write a formal proof for this.

share|cite|improve this question
Iff: First, assume a number is square and show that the prime factorization has even exponents. Then, assume the factorization has even exponents and show that the number is square. In general to prove $A \iff B,$ show both $A \implies B$ and $B \implies A.$ – user2468 Jul 5 '12 at 4:33
After proving this, it should be easy for you to generalize the problem to $n$th powers: integer is an $n$th power if and only if its prime factorization contains only multiples of $n$ as exponents. – Mikko Korhonen Jul 5 '12 at 9:46
up vote 4 down vote accepted

Suppose $a = p_1^{r_1}...p_n^{r_n}$. If $r_i$ are all even, then let $b = p_1^{\frac{r_1}{2}} ... p_n^{\frac{r_n}{2}}$. Then $b^2 = a$.

Suppose $a = b^2$. Let $q_1^{s_1} ... q_m^{s_m}$ be the unique prime factorization of $b$. Then $a = q_1^{2s_1} ... q_m^{2s_m}$. So by unique factorization all primes of $a$ have even powers.

share|cite|improve this answer

Suppose $x=y^2$ for some integer $y$. Let $$y=p_1^{e_1}\cdots p_n^{e_n}$$ be a decomposition of $y$ into primes. Then $$x=y^2=p_1^{2e_1}\cdots p_n^{2e_n}$$ so its prime decomposition has only even exponents.

Suppose the prime decomposition of $x$ has only even exponents, so we can write $$x=p_1^{2e_1}\cdots p_n^{2e_n}$$ for some set of primes $P_i$ and integers $e_i$. Then $$x=\left(p_1^{e_1}\cdots p_n^{e_n}\right)^2$$ so $x$ is a perfect square.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.