# Ruzsa triangle inequality

In additive combinatorics, the Ruzsa triangle inequality, also known as the Ruzsa difference triangle inequality to differentiate it from some of its variants, bounds the size of the difference of two sets in terms of the sizes of both their differences with a third set. It was proven by Imre Ruzsa (1996), and is so named for its resemblance to the triangle inequality. It is an important lemma in the proof of the Plünnecke-Ruzsa inequality.

## Statement

If $A$ and $B$ are subsets of a group, then the sumset notation $A+B$ is used to denote $\{a+b:a\in A,b\in B\}$. Similarly, $A-B$ denotes $\{a-b:a\in A,b\in B\}$. Then, the Ruzsa triangle inequality states the following.
Theorem (Ruzsa triangle inequality) — If $A$, $B$, and $C$ are finite subsets of a group, then
    $|A||B-C|\leq |A-B||A-C|.$
An alternate formulation involves the notion of the Ruzsa distance.
Definition. If $A$ and $B$ are finite subsets of a group, then the Ruzsa distance between these two sets, denoted $d(A,B)$, is defined to be
    $d(A,B)=\log {\frac {|A-B|}{\sqrt {|A||B|}}}.$
Then, the Ruzsa triangle inequality has the following equivalent formulation:
Theorem (Ruzsa triangle inequality) — If $A$, $B$, and $C$ are finite subsets of a group, then
    $d(B,C)\leq d(A,B)+d(A,C).$
This formulation resembles the triangle inequality for a metric space; however, the Ruzsa distance does not define a metric space since $d(A,A)$ is not always zero.

## Proof

To prove the statement, it suffices to construct an injection from the set $A\times (B-C)$ to the set $(A-B)\times (A-C)$. Define a function $\phi$ as follows. For each $x\in B-C$ choose a $b(x)\in B$ and a $c(x)\in C$ such that $x=b(x)-c(x)$. By the definition of $B-C$, this can always be done. Let $\phi :A\times (B-C)\rightarrow (A-B)\times (A-C)$ be the function that sends $(a,x)$ to $(a-b(x),a-c(x))$. For every point $\phi (a,x)=(y,z)$ in the set is $(A-B)\times (A-C)$, it must be the case that $x=z-y$ and $a=y+b(x)$. Hence, $\phi$ maps every point in $A\times (B-C)$ to a distinct point in $(A-B)\times (A-C)$ and is thus an injection. In particular, there must be at least as many points in $(A-B)\times (A-C)$ as in $A\times (B-C)$. Therefore,
    $|A||B-C|=|A\times (B-C)|\leq |(A-B)\times (A-C)|=|A-B||A-C|,$
completing the proof.

## Variants of the Ruzsa triangle inequality

The Ruzsa sum triangle inequality is a corollary of the Plünnecke-Ruzsa inequality (which is in turn proved using the ordinary Ruzsa triangle inequality).
Theorem (Ruzsa sum triangle inequality) — If $A$, $B$, and $C$ are finite subsets of an abelian group, then
    $|A||B+C|\leq |A+B||A+C|.$
Proof. The proof uses the following lemma from the proof of the Plünnecke-Ruzsa inequality.
Lemma. Let $A$ and $B$ be finite subsets of an abelian group $G$. If $X\subseteq A$ is a nonempty subset that minimizes the value of $K'=|X+B|/|X|$, then for all finite subsets $C\subset G,$
    $|X+B+C|\leq K'|X+C|.$
If $A$ is the empty set, then the left side of the inequality becomes $0$, so the inequality is true. Otherwise, let $X$ be a subset of $A$ that minimizes $K'=|X+B|/|X|$. Let $K=|A+B|/|A|$. The definition of $X$ implies that $K'\leq K.$ Because $X\subset A$, applying the above lemma gives
    $|B+C|\leq |X+B+C|\leq K'|X+C|\leq K'|A+C|\leq K|A+C|={\frac {|A+B||A+C|}{|A|}}.$
Rearranging gives the Ruzsa sum triangle inequality.
By replacing $B$ and $C$ in the Ruzsa triangle inequality and the Ruzsa sum triangle inequality with $-B$ and $-C$ as needed, a more general result can be obtained: If $A$, $B$, and $C$ are finite subsets of an abelian group then
    $|A||B\pm C|\leq |A\pm B||A\pm C|,$
where all eight possible configurations of signs hold. These results are also sometimes known collectively as the Ruzsa triangle inequalities.