# Puzzles

## Square in a triangle

A right-angled triangle has short sides of length \(a\) and \(b\). A square is drawn in the triangle so that two sides lie on the sides of the triangle and a corner lies on the hypotenuse.

What is the length of a side of the square?

#### Show answer & extension

#### Hide answer & extension

Call the length of a side of the square \(x\). CAB and CEF are similar triangles, therefore:

$$\frac{EF}{AB}=\frac{EC}{AC}$$
$$\frac{x}{a}=\frac{b-x}{b}$$
$$bx=ab-ax$$
$$x=\frac{ab}{a+b}$$

#### Extension

Consider a tetrahedron with vertices at \((0,0,0)\), \((a,0,0)\), \((0,b,0)\) and \((0,0,c)\). A cube is placed in the tetrahedron so that three of its faces are in the xy, xz and yz planes and one of its vertices lies on the other face.

What is the length of a side of the cube?