If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Pythagorean theorem in 3D

Discover how to find the length of an edge in a 3D shape using the Pythagorean theorem! This fun math lesson explores right pyramids and rectangular prisms, guiding you through solving for unknown lengths by applying the theorem multiple times.

Want to join the conversation?

  • female robot grace style avatar for user Anna
    Could you use the 3D pythagorean theorem which is a^2 + b^2 + c^2 = d^2 to figure out the edge of a pyramid given the side lengths of the base and the vertical height.
    (55 votes)
    Default Khan Academy avatar avatar for user
  • spunky sam red style avatar for user M. S.
    I am colorblind and can not tell what is going on. Is there another video that someone could suggest?
    (41 votes)
    Default Khan Academy avatar avatar for user
    • primosaur seed style avatar for user Ian Pulizzotto
      Let L, W, and H represent the dimensions (length, width, and height) of a rectangular prism, let C represent a diagonal of the bottom face, and let D represent a long diagonal of the prism.

      We use the regular (2-dimensional) Pythagorean theorem on two right triangles.

      One right triangle has legs L & W and hypotenuse C. This gives L^2+W^2=C^2.

      The other right triangle has legs C & H and hypotenuse D. This gives C^2+H^2=D^2.

      Substituting the first equation into the second equation gives the 3-dimensional result L^2+W^2+H^2=D^2. Notice how this is just like the 2-dimensional Pythagorean theorem, except that one more square is being added.
      (28 votes)
  • male robot hal style avatar for user Skywalker65
    Can you make more another video to help explain the Harder Pythagorean theorem in 3D problems?
    (20 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Chi
    I find the whole video confusing. I would have preferred that he used a cube. When I looked up this video I thought it would thoroughly explain how to solve Pythagoras' theorem questions involving cubes but he seems to be using some sort of pyramid and it is all so confusing. I searched this to clarify this- http://www.bbc.co.uk/schools/gcsebitesize/maths/geometry/pythagoras3drev1.shtml

    But I'm still as confused as I was after looking at that website
    (18 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user ary
    why do we need the other dimensions then like the 3?
    (8 votes)
    Default Khan Academy avatar avatar for user
  • duskpin sapling style avatar for user Hayden Ludwig
    2006 was 1 year after I was born! Did you know that?!
    (9 votes)
    Default Khan Academy avatar avatar for user
  • hopper cool style avatar for user Ashlyn Ambrose
    There is too much going on here for my mush of a brain to understand :(
    (7 votes)
    Default Khan Academy avatar avatar for user
  • purple pi purple style avatar for user louisaandgreta
    At I don’t quite understand how Sal knows it’s a 90 degree angle
    (6 votes)
    Default Khan Academy avatar avatar for user
  • stelly green style avatar for user .
    I am struggling to visual this, can someone please help explain?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • leafers tree style avatar for user hymloq
      What I find helpful is breaking the prism into two dimensional shapes. In this particular scenario, the pythagorean theorem is used twice, once to find the base and once to find the actual length we are looking for.

      What we are looking for is the lateral edge of the pyramid, which basically amounts to a diagonal "slice" of the pyramid. So that's a 2D right triangle. Now, we know the height (which we'll assign the variable a) of that triangle (1 unit) but we are not given the length of the base of the triangle.

      To find the base (which we'll call b), we look at the 2x4 rectangle that forms the base of the pyramid. What we're looking for is the distance from the center of the rectangle (where a originates) to one of the corners of the rectangle, where our lateral edge begins. If you draw it out, a point halfway along the edge of the rectangle, the start of a, and the corner where the lateral edge begins forms a right triangle. To calculate the distance from the start of a to the start of the lateral edge, all we need to do is find the hypotenuse of the right triangle.

      So:
      A^2 + B^2 = C^2
      1^2 + 2^2 = 5
      so sqrt(5) is the distance between the start of A and the start of the lateral edge. So the base of our final triangle, b, is sqrt(5).

      Great! Now we can plug the base and the height into the equation for the lateral edge.

      a^2 + b^2 = c^2
      1^2 + sqrt(5)^2 = ?

      one squared is one.
      when sqrt(5) is squared, the sqrt and the square cancel out, so 5.

      1+5 = 6
      six is not a perfect square, so we leave our solution as *sqrt(6)*.

      Hope this helps! ^-^
      (7 votes)
  • leaf blue style avatar for user Mrs. Worthy
    I'm not sure what 8th Grade Common Core Standard this would fall under.
    (2 votes)
    Default Khan Academy avatar avatar for user

Video transcript

- [Voiceover] So we have an interesting shape right over here. The base is a rectangular prism. And the dimensions of that rectangular prism, it's three units I guess we could say tall, four units wide, and then four units long. And then on top of that, on top of that, we have what you could call a right pyramid, where the height of this right pyramid, so if you start at the center of its base right over here, and you go to the top, this height right over here is one unit. And this hasn't been drawn completely to scale, and kind of the perspective skews a little bit. But our goal here, our goal here, is to figure out what is the length? What is the length of one of these edges right over here? So either that one, or this one right over here. What is that length? And we will call that, we will call that x. And so I encourage you to pause this video and try to think about it on your own. Remember, this is a right, this is a right pyramid. So what that tells us is that this red line, that's one unit long, it is perpendicular, it is perpendicular to this entire plane. It's perpendicular to the top of the rectangular prism. So with that in mind, I encourage you to pause the video and see if you can figure it out. And I will give you a hint. You will have to use the Pythagorean theorum, maybe more than once. Alright, so I am assuming you've at least given it a shot. So let's work through it together. So the key here is to realize, well okay this point, this base right over here, this point right over here it's half way in this direction and half way in this direction. So we can figure out, well this entire length right over here is length four. So half way, this is going to be, I'll write it with perspective. That's going to be two, and that's going to be two. Just like that. And then the other thing we can figure out, we can figure out what this length is going to be. 'Cause once again it's half way in that direction. So if this whole thing is two, and we see it right over here. This is a rectangular prism, so this length is going to be the same thing as this length. So if this whole thing is two, then each of these, this is going to be one, and this is going to be one right over there. Well how does that help us? Well using that information, we should be able to figure out this length. Actually, I'll keep it in this color 'cause this color's easy to see. We should be able to figure out this length. Well why is this length interesting? Well if we know that length, that length forms a right triangle. That length and the one are the two non-hypotenuse sides of a right triangle. And then the x would be the hypotenuse. So we could just apply the Pythagorean theorem. So if we can figure out this, we can figure out x. So let's do one step at a time. How do we figure out, how do we figure out I dunno, let me call this length. How do we figure out length a? Well let's just take it out and look at it in two dimensions. So if we look at it in two dimensions, If we look at it in two dimensions, it would look something like this. So that's our length a. We know that this length is half of this side right over here, so that's going to be one. And actually let me do it in the same colors. So this right over here is the same thing as this right over here. And it is going to be of length one. And then this right over here is going to be the same as this right over here, which is going to be of length two. And so we can just use the Pythagorean theorem here. We know that the hypotenuse squared is going to be equal to one squared, one squared plus two squared. One squared plus two squared, which of course, is equal to one plus four, which is equal to five. So we could write a... Let me do this in the magenta color. We can write a squared is equal to five, or we could say that a is equal to the principal root of five. So this length right over here is the square root of five, the principal root of five. And now we can use that information to solve for x. So let's take this right triangle. And it takes a little bit of visualization practice to visualize this right. But notice, this is a right triangle. This height right here of length one is perpendicular to this entire plane. So let's see if I can draw it. So we have this side is the square root of five. And then we have a height, Let me do it, looks like it's in a... Well, I'd say we're talkin' about this height right over here is length one. So I'll draw that, that is of length one. And we are trying to figure out x. We are trying to figure out x in orange. So we're trying to figure out this x. And once again, we know this is a right triangle. This is a right triangle, so we can apply the Pythagorean theorem again. So we will have x squared is equal to one squared. Which is just, I'll just write it one squared plus square root of five squared, plus square root of five squared. Well, that gets us x squared is equal to one plus five, right? Square root of five squared is just five. So one plus five is equal to six. So we get x is equal to the square root of six. And we're done! We figured out the length of this side right over here.