Maximum area of a triangle in a square For a given square, consider 3 points on the perimeter to form a triangle. How to prove that:


*

*The maximum area of triangle is half the square's.

*The maximum area of triangle occurs if and only if the chosen points are vertexes of the square.


Here is an analytic solution.
Let $p_i$ be the vertices of the triangle. We can take the square to have side $1$, without loss of generality. So, we require $p_i \in S=[0,1]^2$. If $p_1$ lies in the interior of $S$, then $p_1$ can be moved in a direction perpendicular to, and away from, the line joining  $p_2$ and $p_3$ until it touches the edge. This increases the area. Similarly for the other vertices. So we may assume that $p_i \in \partial S$, the boundary of the square.
If two vertices lie on the same edge, then they may be spread apart, increasing the area until they are at opposite ends of the edge. So, we may assume that each point lies on an edge that no other point lies on (the wording is awkward because a vertex lies on two edges).
So, by rotating if necessary, we may suppose that $p_1 = (x_1,0)$, $p_2 = (x_2,1)$, and $p_3 = (0,y)$, with $x_1,x_2,y \in [0,1]$.
The area is given by $A(x_1,x_2,y) = \frac{1}{2} | (p_1-p_3) \times (p_2-p_3)| = \frac{1}{2} |x_1(1-y)+yx_2|$. Since $p_i \in S$, we have $2 A(x_1,x_2,y) = x_1(1-y)+yx_2$.
It is easy to see that $A$ is a non-decreasing function of $x_1,x_2$, so it is maximized with $x_1 = x_2 =1$, which gives $2  A(1,1,y) = 1$, the desired result.
Since $A(1,1,y) = \frac{1}{2}$ for any $y \in [0,1]$, we see that the second statement cannot be true.
