To solve the problem, we need to set up equations for the areas of the triangle and the square, then solve for the altitude of the triangle.
Firstly, consider the area of the square:
- Area of a square with side \( x \) is \( x^2 \).
Now, consider the area of the triangle:
- Area of a triangle is given by \( \frac{1}{2} \times \text{base} \times \text{altitude} = \frac{1}{2} \times x \times \text{altitude} \).
Since the area of the triangle is equal to the area of the square, we have:
- \(\frac{1}{2} \times x \times \text{altitude} = x^2\)
To find the altitude, solve the equation:
- Multiply both sides by 2:
\(x \times \text{altitude} = 2x^2\) - Divide both sides by \( x \) (assuming \( x \neq 0 \)):
\(\text{altitude} = \frac{2x^2}{x} = 2x\)
Thus, the altitude of the triangle is \( 2x \).