# Is it possible to divide a square into four parts of arbitrary size with two lines? [closed]

I am trying to visualize conditional probabilities. If you have two independent events $A$ and $B$, you can visualize the probabilities of all combinations $$A \cap B\qquad A \cap \neg B\qquad\neg A \cap B\qquad\neg A \cap \neg B$$ by just drawing the unit square and dividing it vertically with a line at $P(A)$ and horizontally with a line at $P(B)$.

But if they're not independent it's... harder. But seems maybe possible with diagonal lines? Seems like perfect independence should be $90^{\circ}$ and perfect dependence should be $0^{\circ}$ parallel lines.

• Many of us can explain conditional probabilities and independent events using Venn diagrams, trees, or mathematical expressions. But I am not sure what you mean by "vertically with a line at $P(A)$ and horizontally with a line at $P(B)$". And what role is a diagonal line supposed to play? Aug 27, 2017 at 18:21
• Why such a question should be closed ? It is representative of the "Haha" type of questions which brings fresh air on very basic stuffs. Aug 28, 2017 at 7:44
• If you made a diagram, your question would be much clearer, and would be great for re-opening. Since I can't post an answer now, I'll answer here first. You have a square divided into 2 rectangle pieces by a vertical line. Let $L(x)$ be the ray at angle $x$ to the upward vertical that cuts the left piece into the desired ratio (area on the left of $L(x)$ to total area). Then as $x$ changes continuously, $L(x)$ also changes continuously, hence the ratio $r(x)$ at which $L(x)$ cuts the right piece changes continuously. $r(0) = 0$ and $r(180^\circ) = 1$, hence by IVT $r(x)$ covers all of $[0,1]$. Aug 29, 2017 at 8:36
• The only technical detail that needs to be handled in my above proof sketch is to show that $L(x)$ changes continuously with $x$. This is easy to show here because the left piece is bounded and so we have tight bounds for the location of $L(x')$ given $L(x)$ and $|x'-x|$. It still deserves a proper proof, since such claims are not necessarily true in general. Aug 29, 2017 at 8:47

Comment. The usual representation is to use a vertical divider along with horizontal lines at two appropriate heights. For example: $P(A)=.3, P(B|A)=.6,$ etc. could be represented as:

Unlike the usual Venn Diagrams, the idea is to represent probabilities by areas.

Yours is a clever idea, but I don't see how to draw an appropriate diagonal line. I suspect it may be impossible in some cases, especially if the areas of the left and right regions differ greatly. If you have a solution to this, I'd be really happy to see it.

• Find midpoints of the two horizontal dividers and draw a straight line through them. In the case of a great difference in conditional probabilities the slant line may meet the upper and lower edge of the graph; I have no idea how to resolve it in general case. Aug 27, 2017 at 19:05
• @CiaPan: Hint: IVT. Aug 29, 2017 at 8:01

I consider this an elaboration of BruceET's answer.

Given two lines in the plane, $S$ and $V$ let the areas of four regions they chop the unit square into be $\begin{pmatrix}A_{11}&A_{12}\\A_{21}&A_{22}\end{pmatrix} =\begin{pmatrix}A_{11}(S,V)&A_{12}(S,V)\\A_{21}(S,V)&A_{22}(S,V)\end{pmatrix}$ (where $A_{11}(S,V)$ means the area above $S$ and to the left of $V$, etc). Given four target numbers $\begin{pmatrix}a_{11}&a_{12}\\a_{21}&a_{22}\end{pmatrix}$, whose sum is $1$, where we assume all the $a_{ij}>0$ and that $a_{11}\lt a_{21}$, we construct $S$ and $V$ so that all the $A_{ij}=a_{ij}$. We pick $V$ to be the vertical line cut out by $x=a$ where $a=a_{11}+a_{21}$, and exhibit a homotopy (indexed by $t\in[0,1]$) of lines $S(t)$, so that the areas $A_{i1}(S,V) = a_{i1}$ for $i=1,2$ and so that $A_{21}(S,V)$ passes continuously from $1-a$ to $0$.

We specify the line $S$ by giving the coordinates of two points $P(t)$ and $Q(t)$ on $L(t)$, as functions of the homotopy index $t\in[0,1]$. Let $Q(t)=(a,t)$.

For $t\in[0,1-2a_{11}/a]$, let $P(t)=(a-2a_{11}/(1-t),1)$.

For $t\in[1-2a_{11}/a,0],$ let $P(t) = (0,2-2a_{11}/a - t).$

We see that for no value of $t$ is $P(t)=Q(t)$, so $S(t)$ is well-defined. One checks that $A_{11}(S(t),V)=a_{11}$ for all $t$. In words, the point $Q$ steadily rises along $V$. The point $Q$ starts on the top border of the square, moves left until it hits the upper left corner of the square, then descends along the left edge of the square. The slope of $S(t)$ starts negative and increases until it becomes positive. The line $S(t)$ sweeps over all the area in the square to the right of $V$. The area $A_{21}(S,V)$ to the right of $V$ and above $S(t)$ changes continuously in $t$, from $1-a$ down to $0$. Along the way it hits $a_{21}$.

• I am sure this result is an easy consequence of some obvious generalization of the Ham Sandwich theorem, but I can't access my library just now. Aug 27, 2017 at 21:50
• It isn't true in general and depends strongly on the shape of the pieces. For example you can't cut a watermelon so that the skin is halved while the flesh is divided into 1:2. Similarly for a torus in 2d. That's why the ham sandwich theorem only claims that all pieces can be halved. Aug 29, 2017 at 8:14
• See my comments below the question for a quicker elementary proof. =) Aug 29, 2017 at 8:45