# Generalizations of Pythagoras' Theorem

## Pythagoras' Theorem Pythagoras' Theorem says that, in a right angled triangle:
the square of the hypotenuse (c) is equal to the sum of the squares of the other two sides (a and b).

a2 + b2 = c2

## Pythagoras' Theorem in 3D

The world we live in has three dimensions, so what would happen if we consider the Pythagorean Theorem in 3D?

Well, the Theorem still holds, and we would have something like this: The square of the distance c from the bottom-most left front corner to the top-most right back corner of this cuboid whose sides are x, y and z, is:

c2 = x2 + y2 + z2

And this is part of a pattern that extends onwards into any number of dimensions. For the n-th dimension, we have:

c2 = a12 + a22 + ... + an2

So we can generalize Pythagoras' Theorem, going from 2D to 3D and up until any number of dimensions.

## Law of Cosines

What if the triangle does not have a right angle?

For any triangle: a, b and c are sides.
C
is the angle opposite to side c

The Law of Cosines (also called the Cosine Rule) says:

c2 = a2 + b2 − 2ab cos(C)

It has a2, b2 and c2, and an extra term: 2ab cos(C)

Learn how to use it and find out more at Law of Cosines!

These two generalizations are already nice and inspiring... But wait, there is more!

## Pythagoras' Theorem and Areas

Do they need to be squares on the triangle's sides? Read more at Pythagoras' Theorem and Areas.

## Higher Exponents?

Finally, another type of generalization is to try higher exponents:

an + bn = cn   n>2

An example is n=3: are there any whole numbers that make this true?

a3 + b3  = c3

In geometry this is the same as asking:

Using only integer sides, can we split a cube into two cubes?

Can we? Your Turn! To answer this, search the web for the well-known mathematician Pierre Fermat and his famous Last Theorem.