Answer:
use the Pythagorean theorem
Step-by-step explanation:
The slant height is the hypotenuse of a right triangle whose legs are the height of the pyramid and the distance from the edge of the base to the center of the pyramid (where the height segment reaches the base).
For h = pyramid height, b = base edge length, s = slant height, the Pythagorean theorem tells you ...
h² + (b/2)² = s²
Solving for h gives ...
h = √(s² -(b/2)²) . . . . . the height of the pyramid