Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given a quadrilateral with 4 fixed lengths, is there a way to solve for its angles?

For example, I have a quadrilateral with 4 sides:

  1. 698.8m

  2. 512.5m

  3. 511.9m

  4. 695.8m

How do we solve for its unknown angles?

share|cite|improve this question

When you connect four rods of given length cyclically with knee-joints the resulting structure will not be rigid. This implies that the four lengths do not determine the angles between successive rods. Instead you will get $2$ equations for $\alpha$, $\beta$, $\gamma$, $\delta$, and there is the extra condition $\alpha+\beta+\gamma+\delta=2\pi$. So there is one degree of freedom.

You obtain the two equations by computing the length squares $e^2$ and $f^2$ of the two diagonals by means of the cosine theorem in two ways each, and then forgetting about $e$ and $f$.

Edit. When just one solution is needed we can arbitrarily give one of the angles a reasonable value and then numerically compute the other three angles. E.g., let the angle $\alpha_{23}$ between $a_2$ and $a_3$ be $90^\circ$. Then one diagonal $d$ can be computed by means of Pythagoras' theorem, and it remains to determine the angles of two triangles whose sides are known. This can be done using the cosine law. E.g., the cosine of the angle $\alpha_{41}$ is given by $$\cos\alpha_{41}={a_4^2+a_1^2-d^2\over 2 a_4 a_1}\ .$$

share|cite|improve this answer
Which is of course the reason bridges, domes, and other buildings are built out of triangular segments instead of rectangles. – nbubis Feb 6 '13 at 15:23
@nbubis larger buildings anyway. Aside from the roof and supports for a flight of stairs, framed houses are almost entirely built from rectangles. – Dan Neely Feb 6 '13 at 18:35
+1. Such a structure is called a four-bar linkage, and Wikipedia has a decent article about them. – ruakh Feb 6 '13 at 18:40
@Christian, hmm I can see that we can have infinite solutions, but I don't really get the last paragraph.. how do we solve a single solution to this problem? (i.e. any solution would do, I just need a possible answer) – Pacerier Feb 6 '13 at 21:55
(Hmm, the answer had to be as square-ish as possible if that makes sense, otherwise any answer would do. Is trial-and-error the only way?) – Pacerier Feb 6 '13 at 22:02

There is no way to find the angles without an additional constraint. To see this, lie one edge horizontally, and attach two other edges at each side. Each of the two edges has one degree of freedom (namely the angle), but the forth edge gives only one constraint - namely the distance between the two end points.

Thus, you have two unknowns and only one equation, which means there is no unique solution for the angles.

To find "a" solution, just choose one of the angles arbitrarily, so you know the position of three points (say $A,B,C$) in the plane. To find the fourth point $D$, you have to solve the equations:

$$L_1^2 = (C_x-D_x)^2 + (C_y-D_y)^2$$ $$L_2^2 = (B_x-D_x)^2 + (B_y-D_y)^2$$ In the unknowns $D_x,D_y$. Once you find the coordinates, you can use the dot product to find the rest of the angles.

share|cite|improve this answer
But how do we go about finding a single solution? i.e. any solution will do – Pacerier Feb 6 '13 at 21:44
@Pacerier - added to my answer. – nbubis Feb 6 '13 at 22:12

I don't think there's enough information unless you exclude reflex angles. E.g. the sides above could make something looking like a kite or an arrow-head.

Edit: There are an infinite number of solutions. Joining four pencils / pens you can make any number of kites, from long skinny ones to ones that are nearly rectangular. I.e. what nbubis and Christian Blatter said.

share|cite|improve this answer
Yes if we do exclude reflex angles, how do we go about finding a solution? – Pacerier Feb 6 '13 at 21:45

There is a systematic way to find all such quadrilaterals using algebra (as mentioned in the responses, the solution is not unique). It is easier to work symbolically; we assume that we are given $a$, $b$, $c$ and $d$ and are looking for a quadrilateral $ABCD$ so that the lengths of the sides are $a$, $b$, $c$ and $d$ starting with $|AB|=a$ and continuing cyclically. Then there are unique $p$, $q$, $p_1$ and $q_1$ so that the quadrilateral is congruent to the one with $A=(0,0)$, $B=(a,0)$, $C=(p,q)$ and $D=(p_1,q_1)$---we translate $A$ to the origin and then rotate to position $B$ on the positve real axis. We use Mathematica to solve $$b^2=(p-a)^2+q^2,\quad c^2=(p_1-p)^2+(q_1-q)^2,\quad d^2=p_1^2+q_1^2.$$ Mathematica can deal with this equation and produces a family of solutions which depend on one parameter. For concrete data as in the question one need only substitute these values in the equation and solve again. The output is too complicated to reproduce here but it can be computed using Mathematica or Wolfram Alpha in a few minutes.

As mentioned above, one requires one additional piece of information to determine the quadrilateral---for example one angle or one diagonal: these follow easily from the usual triangle constructions. More interestingly, if one knows the area, then one gets two solutions, which sometimes coalesce to single one. (There are constraints on the data, of course, which are required for any solution to exist, as in the case of many triangle constructions). This can be seen by adding the fourth equation $$2 F=p_1 q_1 + (a-p)q + (p-p_1)(q+q_1) $$ where $F$ is the area. The form of the solution show that the resulting quadrilaterals can be constructed using ruler and compass. We are using signed areas which allows non-convex quadrilaterals as solutions in some cases.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.