Given an equilateral triangle and a point $D$ on one of its sides, I need to construct a square $DEFG$ with the vertices $E, F$ lying on the other two sides of the triangle and $G$ somewhere inside it (see picture).

enter image description here

I know if $D$ is the midpoint of the respective side, the problem is easy, but how about the general case? Are there any solutions at all? Actually, my intuition says there should not be if $D$ is not quite close to the middle.

Furthermore, I have tried using analytic geometry but it quickly became messed up....so I wonder also if we can construct such a square with compass and ruler only.

Thanks in advance.

  • 1
    $\begingroup$ When you are asking for the solution, are you looking for the coordinates of the vertices of the square? Or perhaps the side length/area? And could you share your easy solution for when D is in the middle, as I am not seeing an easy way to find the square without lots of calculation. In fact, I think there is no solution for D being the midpoint. $\endgroup$
    – Gabe
    Aug 21, 2019 at 20:24
  • $\begingroup$ @Gabe, I do not care so much about the cords of the square as about it's existence. If $D$ is the midpoint there is always solution, a nice and symmetric one. Just draw two lines starting from point $D$ and they make $45$ degrees each with the side of the triangle that $D$ rests. These lines intersect the other 2 sides of the triangle and so we get the 3 vertices of the desired square. $\endgroup$
    – dmtri
    Aug 22, 2019 at 11:23
  • 1
    $\begingroup$ I can see what your solution is, but then the square would be DEGF not DEFG, correct? $\endgroup$
    – Gabe
    Aug 22, 2019 at 13:57
  • $\begingroup$ @Gabe, Ahh yes! you are right !I have not stated well in my question. Thanks! $\endgroup$
    – dmtri
    Aug 22, 2019 at 17:48
  • $\begingroup$ @dmtri you changed the question which is against ethical policy of this site. The triangle was not equilateral. $\endgroup$
    – user376343
    Aug 23, 2019 at 20:44

4 Answers 4


As $DF=DE\sqrt 2$ and the angle $\angle EDF=45^{\circ},$ the point $F$ is obtained from $E$ through the rotation composed with the homothety (common center $D$, angle and ratio as above).

Construct in this transformation the image of the side that should contain $E.$ Its intersection (if it exists) with the side that doesn't contain $D$ is $F.$ enter image description here

  • $\begingroup$ Thanks for your answer, but I do not quite get how you construct the points $B', C'$ ...can you please elaborate a bit more? And by the way which software do you use to make these nice schemes? Is it free on the internet? $\endgroup$
    – dmtri
    Aug 22, 2019 at 11:29
  • $\begingroup$ By both mentioned transformations is a straight line transformed in a straight line. The point B' is such that DBB' is an isosceles right triangle with right angle at B. Then we really have $DB'=DB\sqrt 2$ and the angle at D is of $45^{\circ}.$ Similarly is obtained C'. And yes, GeoGebra is free. $\endgroup$
    – user376343
    Aug 22, 2019 at 12:20
  • $\begingroup$ One more issue, please...after trying your method for different positions of point $D$ on the side of the triangle, I realised that point $G$ in some of the cases was lying outside of the triangle....which is something I do not want. Can we fix that also somehow? $\endgroup$
    – dmtri
    Aug 23, 2019 at 19:02
  • $\begingroup$ You're right. There is at most one convenient point F, and even if it exists, G can lie outside the triangle. I don't have hypothesis or constraints for the position of D ... I am thinking of the general triangle, as was in your original question. $\endgroup$
    – user376343
    Aug 23, 2019 at 20:38


the vertex of the triangle between $D$ and $E$ be $A$


the vertex of the triangle between $E$ and $F$ be $C$

Let the length of the side of the triangle be $a$

length of the side of the square be $u$

$\angle ADE = \theta$ (therefore, $\angle EFC = \frac{5 \pi}{6} - \theta$)

length of $AE$ be $x$, therefore length of $CE$ is $a-x$

length of $AD$ be $y$

Then consider the triangle $ ADE$ and use Sine rule:

$\displaystyle \frac{u}{\sin \frac{\pi}{3}} = \frac{x}{\sin \theta} = \frac{y}{\sin \left(\frac{2 \pi}{3} - \theta \right)}$ ........ (1)

Next consider triangle $CEF$ and use Sine rule:

$\displaystyle \frac{u}{\sin \frac{\pi}{3}} = \frac{a-x}{\sin \left( \frac{5 \pi}{6} - \theta \right)}$ ........ (2)

All the above quantities of (1) and (2) are equal to

$\frac{a}{\sin \theta + \sin \left( \frac{5 \pi}{6} - \theta \right)}$

[Ratio of the sum of the numerators and denominators of $\frac{x}{\sin \theta}$ and $\frac{a-x}{\sin \left( \frac{5 \pi}{6} - \theta \right)}$]


$\displaystyle u = \frac{a \sin \frac{\pi}{3}}{\sin \theta + \sin \left( \frac{5 \pi}{6} - \theta \right)}$

$\displaystyle x = \frac{a \sin \theta}{\sin \theta + \sin \left( \frac{5 \pi}{6} - \theta \right)}$

$\displaystyle y = \frac{a \sin \left(\frac{2 \pi}{3} - \theta \right)}{\sin \theta + \sin \left( \frac{5 \pi}{6} - \theta \right)}$


  1. Suppose only $y$ is known. You can easily find $\theta$ and then calculate $u$ and $x$

  2. Not all the values of $y$ are admissible. For example, if $y > \sqrt{3} a$, then the equation does not have any solution. Practically, $0 \leq y \leq a$

  • $\begingroup$ Thanks for your answer but angle $\theta$ has to be determined... How should I do that? $\endgroup$
    – dmtri
    Aug 24, 2019 at 10:29
  • 1
    $\begingroup$ I updated the answer. Please let me know if it is clear now. $\endgroup$
    – PTDS
    Aug 24, 2019 at 15:47
  • $\begingroup$ Thanks for the effort but if I put the vertices of the triagle as you describe nor $AE$ is known nor angle $\theta$. As I state in the question, only the position of point $D$ is known or equivalently the length $AD$... $\endgroup$
    – dmtri
    Aug 24, 2019 at 18:44
  • 1
    $\begingroup$ Hope your questions are answered now. Please let me know if you have any doubt. $\endgroup$
    – PTDS
    Aug 24, 2019 at 23:01
  • 1
    $\begingroup$ Fixed the typo and also edited the solution a bit. $\endgroup$
    – PTDS
    Aug 25, 2019 at 20:53

$\;\;\;$enter image description here

Let triangle $ABC$ be equilateral.

Using coordinates, and then solving algebraically, we get the following result:

If $D$ is on side $BC$, strictly between $B$ and $C$, there is at most one square $DEFG$ such that

  • $E$ is on side $CA$, strictly between $C$ and $A$.$\\[4pt]$
  • $F$ is on side $AB$, strictly between $A$ and $B$.$\\[4pt]$
  • $G$ is in the interior of triangle $ABC$.

and such a square exists if and only if $$4-2\sqrt{3} < \frac{|BD|}{|BC|} < \sqrt{3}-1\qquad(\mathbf{*})$$ Moreover, if $(\mathbf{*})$ is satisfied, then letting $$d=\frac{|BD|}{|BC|}$$ the points $E,F,G$ are uniqely determined by \begin{align*} \frac{|CE|}{|CA|}&=2-\sqrt{3}+d\left(\frac{\sqrt{3}-1}{2}\right)\\[4pt] \frac{|AF|}{|AB|}&=d-2+\sqrt{3}\\[4pt] \end{align*} and where $G$ is the reflection of $E$ over the line $DF$.

  • $\begingroup$ Thanks for your answer, but I do understand 2 things:1) How do you derive inequality (*) 2) The point $D$ is known not $E$ actually, so why do you state the "iff" case on respect on point $E$? Thanks. $\endgroup$
    – dmtri
    Sep 1, 2019 at 20:06
  • 1
    $\begingroup$ @dmtri: My latest edit uses $D$ as the starting point instead of $E$. As regards the inequality, it's just brute-force algebra. Setting $D$ as $d$ of the way from $B$ to $C$, with $d$ unknown, I solved, subject to the given specifications, for the coordinates of $E,F,G$ in terms of $d$. The inequality on $d$ results from the requirement that $D$ is strictly between $B$ and $C$, $E$ is strictly between $C$ and $A$, $F$ is strictly between $A$ and $B$, and $G$ is in the interior of triangle $ABC$. $\endgroup$
    – quasi
    Sep 2, 2019 at 2:18

After receiving these nice comments and answers of you, I decided to post more a big comment than an answer to my question. So supposing that the given triangle is $ABC$ and the point belongs to the $BC$ side. We further can assume (due to homoiothesis) that the sides of the triangle have length equal to $2$. Then posing an horthogonal coord system we can have the following scheme:

enter image description here

$D(d, 0), E(a,\sqrt{3}a+\sqrt{3}), F(b,-\sqrt{3}b+\sqrt{3}), G(z,w)$

So if there is such a square $DEFG$ then $ED\bot EF \iff (a-d)(b-a)+3(a+1)(a+b)=0\qquad(\mathbf{1})$

and $\vert ED\vert = \vert EF\vert \iff (a-d)^2+3(a+1)^2=(b-a)^2+3(a+b)^2\qquad(\mathbf{2})$

The point $G$ would be the reflection of $E$ through the line $DF$ iff :

$(z-a)(b-d)+(w-\sqrt3 a-\sqrt3)(-\sqrt3 b +\sqrt3)=0$ (3)

$(b-d)\frac{\sqrt3(1+a)+w}{2}+\sqrt3(b-1)(\frac{a+z}{2}-d) =0$ (4)

$-1<a,b,z<1,w>0$ (5)

If we want point $G$ to lie in the triangle we should force:

$\sqrt{3}(z+1)-w>0$ and $\sqrt{3}(1-z)-w>0$ (6)

If we solve the above system, using for example WolframAlpha we get a unique solution iff: $$3-2\sqrt{3}<d<4\sqrt{3}-7<0$$


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .