Let $ ABCD $ be a rectangle of area $ S $, and $ P $ be a point inside it. We denote by $ a, b, c, d $ the distances from $ P $ to the vertices $ A, B, C, D $ respectively. Prove that $ a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2\ge 2S $. When there is equality?

1. **Define the problem and apply the British Flag Theorem:**
   Let \( ABCD \) be a rectangle with area \( S \), and let \( P \) be a point inside the rectangle. Denote the distances from \( P \) to the vertices \( A, B, C, D \) by \( a, b, c, d \) respectively. According to the British Flag Theorem, for any point \( P \) inside a rectangle, the sum of the squares of the distances from \( P \) to two opposite corners is equal to the sum of the squares of the distances from \( P \) to the other two opposite corners. Mathematically, this can be written as:
   \[
   a^2 + c^2 = b^2 + d^2
   \]

2. **Express the sum of all distances squared:**
   Using the British Flag Theorem, we can write:
   \[
   a^2 + b^2 + c^2 + d^2 = (a^2 + c^2) + (b^2 + d^2)
   \]
   Since \( a^2 + c^2 = b^2 + d^2 \), we have:
   \[
   a^2 + b^2 + c^2 + d^2 = 2(a^2 + c^2)
   \]

3. **Relate the distances to the sides of the rectangle:**
   Let the sides of the rectangle be \( k \) and \( q \). The area \( S \) of the rectangle is given by:
   \[
   S = k \times q
   \]
   By the properties of the rectangle and the British Flag Theorem, we know that:
   \[
   a^2 + c^2 \geq \frac{k^2 + q^2}{2}
   \]
   This inequality follows from the fact that the sum of the squares of the distances from any point inside the rectangle to the vertices is minimized when the point is at the center of the rectangle.

4. **Apply the inequality to find the minimum sum:**
   Substituting the inequality into our earlier expression, we get:
   \[
   a^2 + b^2 + c^2 + d^2 = 2(a^2 + c^2) \geq 2 \left( \frac{k^2 + q^2}{2} \right) = k^2 + q^2
   \]
   Since the area \( S \) of the rectangle is \( k \times q \), and by the AM-GM inequality:
   \[
   k^2 + q^2 \geq 2kq = 2S
   \]
   Therefore:
   \[
   a^2 + b^2 + c^2 + d^2 \geq 2S
   \]

5. **Determine when equality holds:**
   Equality holds when \( k = q \), meaning the rectangle is actually a square. In this case, the point \( P \) must be at the center of the square for the distances to be equal.

\[
\boxed{a^2 + b^2 + c^2 + d^2 \geq 2S}
\]