Geometry: triangle, prism, pyramid with Pythagoras visual proof
Hypotenuse, general triangles, sine and cosine on the unit circle, prism and pyramid volumes - with a Pythagoras proof you can watch.
A geometry calculator for everything with corners: right and general triangles, sine, cosine, and tangent on the unit circle, plus prism, cuboid, cube, pyramid, and tetrahedron. Type values or drag the corners right in the diagram - and the Pythagorean theorem comes with a proof you can watch, not a rule to memorize.
Right triangle. Drag the corners or type values - the hypotenuse c follows from c = √(a² + b²).
Tip: drag a corner in the diagram - the values update live.
Show formula
c = √(a² + b²) c = √(3² + 4²) = 5A = (a · b) / 2 A = (3 · 4) / 2 = 6What is the Pythagorean theorem and how do I use it?
The Pythagorean theorem says that in a right triangle, the squares of the two legs add up to the square of the hypotenuse: a² + b² = c². To find the longest side, take the square root: with legs a = 3 and b = 4, the hypotenuse is c = √(9 + 16) = 5.
In right-triangle mode you enter the two legs or drag a corner in the diagram - area (a · b / 2) and perimeter update live. The inverse path works too: type a hypotenuse and the second leg adjusts via √(c² − a²) so the triangle stays right-angled. Only when your values cannot form a right triangle at all - say a hypotenuse shorter than a leg - does a warning appear.
Why is the theorem true?
Draw a square on each side of a right triangle: the two smaller squares a² and b² together cover exactly the area of the large square c². The squares-on-sides idea appears just like this in Euclid (Book I, Proposition 47) - and it can be shown, not just asserted.
The "Show proof" button puts that on screen: the areas a² and b² are rearranged, area-preserving, into the square c² until it is filled without gaps - a visual demonstration of the classical proof idea rather than a formal derivation. You see the equation as an identity of areas. Then drag a corner of the triangle and watch all three squares grow with it; the relationship holds. If your system reduces animations, you get the final state as a still image with the same message.
How do you solve a triangle without a right angle?
In general mode, three suitable values from the sides and angles are enough - the law of cosines and the law of sines do the rest. The law of cosines c² = a² + b² − 2ab · cos(γ) is the generalized Pythagorean theorem: at γ = 90° the cosine term vanishes, leaving c² = a² + b².
Which law runs depends on what you enter:
- Three sides: the angles follow from the law of cosines - provided the longest side is shorter than the sum of the other two.
- Two sides and the included angle: the third side comes from the law of cosines, the remaining angles after that.
- One side and two angles: the third angle completes 180°, and the law of sines a / sin(α) = b / sin(β) = c / sin(γ) scales the sides.
- Three angles and no side: that fixes only the shape, not the size - the triangle is drawn with a = 1 and a hint saying so.
You can drag corners here too: a vertex writes the whole side triple and clears any typed angles. Two sides with a non-included angle (the SSA case) are ambiguous - the calculator does not solve that combination. The area always comes from Heron's formula, straight from the three sides.
How is the unit circle connected to sine and cosine?
The unit circle is a circle with radius 1. Every point on it has the coordinates (cos α, sin α) - and because the radius is the hypotenuse of a small right triangle, sin²(α) + cos²(α) = 1 holds. That is the Pythagorean theorem again, written in trigonometry.
In trigonometry mode you set the angle in degrees or radians and see sine (the height), cosine (the width), and tangent (the slope) as colored lines on the circle. At 90° and 270° the tangent has no value - the cosine is 0 there and the line turns vertical. This unit circle is the same circle as in the Geometry: round shapes calculator: radius, area, and round solids over there; here, the angles that become sine and cosine in triangles.
How do you calculate the volume of a pyramid?
Pyramid volume = one third times base area times height. A square pyramid with base side 6 and height 4 holds ⅓ · 36 · 4 = 48 cubic units. The factor ⅓ is no accident: three pyramids with the same base area and height together have exactly the volume of the matching prism.
| Solid | Volume |
|---|---|
| Cuboid | a · b · h |
| Cube (a = b = h) | a³ |
| Triangular prism | base area · h (base area via Heron) |
| Square pyramid | ⅓ · a² · h |
| Regular tetrahedron | a³ / (6 · √2) |
The surface sits right next to each result - the prism additionally reports its lateral surface, the square pyramid its slant height, the tetrahedron its height. The regular tetrahedron is the special case with four equilateral faces: at edge length 6 it holds about 25.5 cubic units, and its height follows from h = a · √(2/3). The diagram shows each solid in depth-shaded 3D, with dashed hidden edges on the cuboid and prism. Many measurements are draggable right in the diagram too - the cuboid edges, the pyramid apex, the tetrahedron edge; a few values (such as two sides of the triangular prism) are typed only.
More from the math corner of Toolflux: the Percentage calculator for shares and discounts, and Large numbers for what comes after a trillion.
Frequently Asked Questions
What is the slant height of a pyramid?
The slant height is the distance from the apex to the midpoint of a base edge - measured along the face, not straight down through the solid. For a right square pyramid (apex above the center) it is s = √(h² + (a/2)²); with base side 6 and height 4 that gives s = 5. You need it for the lateral surface, because the side triangles are exactly as tall as the slant height.
Why is the tangent undefined at 90 degrees?
Tangent is sine divided by cosine - and at 90 degrees the cosine is 0. Division by zero has no result: on the unit circle the tangent line turns vertical and never meets the tangent. At those angles you see a hint instead of a number.
What happens with values that cannot form a triangle?
In the triangle modes (right and general), you get a warning instead of a silent result. Three sides must satisfy the triangle inequality (the longest side is shorter than the sum of the other two), and three angles must add up to 180 degrees. Negative lengths are calculated as absolute values; with degree input in trigonometry mode, angles beyond 360 are wrapped back onto the circle.