# Thread: Line passing through a square

1. ## Line passing through a square

Straight line $\displaystyle l$ passes through the center of a square $\displaystyle ABCD$, whose area is $\displaystyle 1$. Let $\displaystyle a, b, c, d$ denote the shortest distances between line $\displaystyle l$ and points $\displaystyle A, B, C, D$ respectively. How to prove that $\displaystyle a^2 + b^2 + c^2 + d^2 = 1$?

2. Originally Posted by atreyyu
Straight line $\displaystyle l$ passes through the center of a square $\displaystyle ABCD$, whose area is $\displaystyle 1$. Let $\displaystyle a, b, c, d$ denote the shortest distances between line $\displaystyle l$ and points $\displaystyle A, B, C, D$ respectively. How to prove that $\displaystyle a^2 + b^2 + c^2 + d^2 = 1$?
We can model the square as: $\displaystyle A:\left( {0,0} \right),\;B:\left( {1,0} \right),\;C:\left( {1,1} \right),\;D:\left( {0,1} \right),\;E:\left( {\frac{1}{2},\frac{1}{2}} \right)$; E is the center.
Any line containing the center has this form: $\displaystyle px + qy + r = 0\,\mbox{ so } \,p + q = - 2r$.
Using the standard rule for distance we get:
$\displaystyle a = \frac{{\left| r \right|}}{{\sqrt {p^2 + q^2 } }}\,,\,b = \frac{{\left| {p + r} \right|}}{{\sqrt {p^2 + q^2 } }}\,,\,c = \frac{{\left| {p + q + r} \right|}}{{\sqrt {p^2 + q^2 } }}\,,\,d = \frac{{\left| {q + r} \right|}}{{\sqrt {p^2 + q^2 } }}\,$.

Can you put it all together?

3. Hello, atreyyu!

My approach is the same as Plato's . . .

Straight line $\displaystyle L$ passes through the center of a square $\displaystyle ABCD$ with area 1.
Let $\displaystyle a, b, c, d$ denote the shortest distances between line $\displaystyle L$ and vertices $\displaystyle A, B, C, D$ resp.
Prove: .$\displaystyle a^2 + b^2 + c^2 + d^2 \:= \:1$
The vertices are: .$\displaystyle A(0,0),\;B(1,0),\;C(1,1),\;D(0,1)$

The line through center (½, ½) with slope m has the equation:
. . $\displaystyle y - \frac{1}{2} \:=\:m\left(x - \frac{1}{2}\right) \quad\Rightarrow\quad L\!:\:2mx - 2y + 1 - m \:=\:0$

Formula: The distance from point $\displaystyle P(x_1,y_1)$ to line $\displaystyle L\!:\:ax + by + c \:=\:0$

. . . . . . . . is given by: .$\displaystyle \frac{|ax_1 + by_1 + c|}{\sqrt{a^2+b^2}}$

We have: .$\displaystyle a = 2m, b = -2, c = 1-m$

The distance is: .$\displaystyle \Delta \:=\:\frac{|2mx_1 - 2y_1 + 1 - m|}{\sqrt{(2m)^2 + 2^2}} \;=\;\frac{|(2x_1-1)m + (1-2y_1)|}{2\sqrt{m^2+1}}$

For $\displaystyle A(0,0)\!:\;\;a \;=\;\frac{|\text{-}m+1|}{2\sqrt{m^2+1}} \;=\;\frac{|m-1|}{2\sqrt{m^2+1}}$

For $\displaystyle B(1,0)\!:\;\;b \;=\;\frac{|m+1|}{2\sqrt{m^2+1}}$

For $\displaystyle C(1,1)\!:\;\;c \;=\;\frac{|m-1|}{2\sqrt{m^2+1}}$

For $\displaystyle D(0,1)\!:\;\;d \;=\;\frac{|\text{-}m-1|}{2\sqrt{m^2+1}}\;=\;\frac{|m+1|}{2\sqrt{m^2+1}}$

Hence: .$\displaystyle a^2+b^2+c^2+d^2 \;\;=\;\;\frac{(m-1)^2}{4(m^2+1)} + \frac{(m+1)^2}{4(m^2+1)} + \frac{(m-1)^2}{4(m^2+1)} + \frac{(m-1)^2}{4(m^2+1)}$

. . $\displaystyle = \;\;\frac{(m^2 - 2m + 1) + (m^2 + 2m + 1) + (m^2 - 2m + 1) + (m^2 + 2m + 1)}{4(m^2+1)}$

. . $\displaystyle = \;\;\frac{4m^2+4}{4(m^2+1)} \;\;=\;\;\frac{4(m^2+1)}{4(m^2+1)} \;\;=\;\;1$

4. Soraban, does your approach work if the line through the center is vertical?

5. Originally Posted by Soroban

The line through center (½, ½) with slope m has the equation:
. . $\displaystyle y - \frac{1}{2} \:=\:m\left(x - \frac{1}{2}\right) \quad\Rightarrow\quad L\!:\:2mx - 2y + 1 - m \:=\:0$

That's the part I don't get ... would be great if you could explain it further.

6. Hello, Plato!

Does your approach work if the line through the center is vertical?
Good question . . . I hadn't considered it.

I believe it does work . . . since $\displaystyle \lim_{m\to\infty}\frac{4(m^2+1)}{4(m^2+1)} \;=\;1$

Besides: .$\displaystyle a = b = c = d = \frac{1}{2}$
. . Therefore: .$\displaystyle a^2+b^2+c^2+d^2 \:=\:1$