I know the solution should have something to do with a diagonal created by tilting the bed in the doorway, so that means we need to create two imaginary triangles out of the rectangle made by the doorway. (The diagonal, if I remember correctly from 8th grade geometry, is called the hypotenuse.) To do all of this, I guess we first have to convert everything to inches, so let's do that:
Okay, so now we have the equation a2 + b2 = c2, with c2 being the hypotenuse. (Pythagorean's theorem, if I am actually brushing the correct cobwebs off of these dusty old mathematical memories.) a = doorway height, b = doorway width (i.e. the floor, or the base of this triangle), and c = the imaginary diagonal that will, hopefully, be longer than the bed length.
√(6241 + 841)=84.15
Whew! So, if the diagonal is ~84" long, and the bed is 82" long, it will fit!
But wait.... Couldn't we have just turned the bed on its side--so that the width was essentially the length--and gotten it out the doorway like that?
Well, this was a fun mathematical exercise, nonetheless. Nothing like proving those 8th grade math skills were meant to come in handy after all!