Proving a theorem using its converse Converse of Pythagoras' theorem: If the lengths of the sides of a triangle $T$ are $a$, $b$, and $c$, and if $a^2+b^2=c^2$, then the triangle is a right triangle and the side opposite to the right angle is the one whose length is $c$.
Proof: Construct a line segment $XY$ whose length is $a$. Then construct a line segment $YZ$ whose length is $b$ which is perpendicular to $XY$. By construction, the triangle $XYZ$ is a right triangle, and therefore, by Pythagoras' theorem and because we are assuming that $a^2+b^2=c^2$, the length of $XZ$ is equal to $c$. So, the triangle $XYZ$ is similar to the original triangle $T$. Since the triangle $XYZ$ is a right triangle, then so is $T$.What I find peculiar about this proof is the fact that it uses Pythagoras' theorem in order to prove its converse.

It is not the only situation that I am aware of in which this occurs. For instance, there is a proof of the converse of Ceva's theorem  which uses that theorem. But I am not aware of any example outside Euclidean Geometry.

Can anyone provide an example of a theorem of the type $A\implies B$ outside Geometry with a proof which uses the fact that $B\implies A$?

 A: Let $f: A \to B$ be a function and $g: A \to A$, $h: B \to B$ be bijections.
Prove that $f$ is surjective if and only if $h \circ f \circ g$ is surjective.
Proof:  Suppose $f$ is surjective .... we get $ h \circ f \circ g$ is surjective.
Now the converse: Suppose $h \circ f \circ g = :e$ is surjective. Since $g^{-1}$ and $h^{-1}$ are surjective then, by already proven part, we have $h^{-1} \circ e \circ g^{-1}=f$ is surjective.
A: Definition: Graph $G$ is perfect if each $H\leq G$ has chromatic number the same as clique number.
Theorem: (László Lovász, 1972) Graph $G$ is perfect iff it complement $\overline{G}$ is perfect.
Proof:

*

*Suppose if part is proven.

*Now let $\overline{G}$ be perfect. Then by already proven part also $\overline{\overline{G}}$ is perfect. But $\overline{\overline{G}} =G$ and we are done.

A: Say natural number $n$ is good if it can be writen as a sum of two squares.
Theorem: $n$ is good iff $2n$ is good.
Proof: If $n=a^2+b^2$ then $2n = (a+b)^2+(a-b)^2$ and we are done.
Now the converse. Say $2n$ is good. Then, by already proven part, also $4n$ is good, so $$4n = x^2+y^2$$ Since $x,y$ must be both even, we can write $a=x/2$ and $b=y/2$ and we are done.
A: I've just found the following :

Let $K$ an infinite field. $f(x_0,...,x_n)\in K[x_0,...,x_n]$ is homogeneus of degree $d$ $\Longleftrightarrow$ $f(\lambda x_0,...,\lambda x_n) = \lambda^d f(x_0,...,x_n)$ for all $\lambda\in K$.

Proof: $\Rightarrow$) For each monomial of $f(\lambda x_0,...,\lambda x_n)$ you can take out a factor $\lambda^d$. Hence we have the statement (basically is the definition).
$\Leftarrow$) Suppose $f(x_0,...,x_n)=\sum_{i=1}^kf_{j_i}(x_0,...,x_n)$ where $f_{j_i}$ are homogeneus of degree $j_i$. Now we have:
$$
f(\lambda x_0,...,\lambda x_n) = \sum_{i=1}^kf_{j_i}(\lambda x_0,...,\lambda x_n)\\
\lambda^d f(x_0,...,x_n) = \sum_{i=1}^k \lambda^{j_i}f_{j_i}(x_0,...,x_n)
$$
where the operation in the LHS is the hypotesis and in the RHS we are using the arrow ($\Rightarrow$) of this proposition.
Hence the polynomial $t^d f(x_0,...,x_n) - \sum_{i=1}^k t^{j_i}f_{j_i}(x_0,...,x_n) \in K(x_0,...,x_n)[t]$ has infinite solutions ($K$ is infinite), so it is the $0$ polynomial. 
Then in the RHS survives only the degree $d$ part and $f$ is homogeneus.
A: Sorry, could not resist to write this one from geometry, due to its simplicity.
Suppose $ABCD$ is convex quadrilateral with sides $a,b,c,d$. Then $ABCD$ is tangent iff $a+c = b+d$ ($a,c$ are opposite sides).
Proof: Suppose $ABCD$ is tangent, then ... $a+c=b+d$
Now the converse. Say lines $AD$ and $BC$ meet at $E$ and draw an incircle in triangle $ABE$. Say tangent at $C$ meet $AE$ at $D'$. We have to prove $D'=D$. . 
Suppose it is not. But then we have, by already proven part $a+c' = b+(d-x)$
By hypothetis we have also $a+c=b+d$ so $c=c'+x$. But this is impossible because of triangle inequality in $CDD'$. A contradiction.
A: Theorem: Forest $G$ with $n$ nodes is connected iff it has $n-1$ edges.
Proof: Suppose we already prove if direction. Now only if.
Suppose it is not connected. Let $C_1,C_2,...C_k$ be it components and $k\geq 2$. Then, by already proven part, we have $c_i-1$ edges where $c_i= |C_i|$ in each component $C_i$. Now we have $$(c_1-1)+(c_2-1)+...+(c_k-1) = n-1$$ But then we have $$n-k = c_1+c_2+...+c_k-k=n-1$$
A contradiction.
