Verifying the Three-Dimensional Analog of the Pythagorean Theorem

Define the distance formula.

> dist:=(p,q)-> sqrt((p[1]-q[1])^2+(p[2]-q[2])^2+(p[3]-q[3])^2);

dist := proc (p, q) options operator, arrow; sqrt((...

Define Heron's formula.

> area:=proc(p,q,r) local a,b,c,s; a:=dist(p,q); b:=dist(p,r); c:=dist(q,r); s:=(a+b+c)/2; sqrt(s*(s-a)*(s-b)*(s-c)); end proc;

area := proc (p, q, r) local a, b, c, s; a := dist(...
area := proc (p, q, r) local a, b, c, s; a := dist(...

Give the coordinates of the four vertices of a right tetrahedron.

> p0:=[0,0,0]; p1:=[a,0,0]; p2:=[0,b,0]; p3:=[0,0,c];

p0 := [0, 0, 0]

p1 := [a, 0, 0]

p2 := [0, b, 0]

p3 := [0, 0, c]

Calculate the sum of the squares of the areas of the lateral faces.

> simplify((area(p0,p1,p2))^2+(area(p0,p1,p3))^2+(area(p0,p2,p3))^2);


Calculate the square of the area of the slant face.

> expand((area(p1,p2,p3)^2));