Did I make a mistake in my proof of triangular ineqality by squaring both sides?

35 Views Asked by At

I have a proof of the triangular inequality given below:

Theorem: For any real numbers $x$ and $y$, $|x + y| \leq |x| + |y|$.

Proof:

\begin{align} (x + y)^2 &\leq (|x| + |y|)^2\tag{square both sides} \\ (x + y)^2 &\leq x^2 + 2|x||y| + y^2\tag{expand right-hand side} \\ x^2 + 2xy + y^2 &\leq x^2 + 2|x||y| + y^2\tag{expand left-hand side}\\ 2xy &\leq 2|x||y|\tag{eliminate like terms}\\ xy &\leq |xy|\tag{simplify}\\ (xy)^2 &\leq (xy)^2\tag{square both sides}\\ \texttt{True} \end{align}

I was worried that squaring both sides of an inequality in the last line of transformation might be incorrect because $xy$ is not necessarily positive. But I don't know how to prove that $xy \leq |xy|$ otherwise.

1

There are 1 best solutions below

0
On

I think one does not actually need to prove that $xy \le |xy|$ as it's obvious. However, as long as you want to know how to prove it, here is the hint:

  1. Check and compare the product when both $x$ and $y$ have the same sign with its absolute value. Ensure your inequality is true.

  2. Check and compare the product when $x$ and $y$ have different signs (so the product has to be negative) with its absolute value. Ensure your inequality is true.

Then you're done.