A beam is a structural member that carries loads perpendicular to its length, and its strength depends on its material, length, cross-sectional shape, and how it is supported. When a beam bends under load, the top surface compresses and the bottom surface stretches, with a neutral axis in the middle that experiences neither. The shape of the cross-section dramatically affects beam strength: an I-beam is far stronger than a flat bar of the same material and weight because its material is concentrated far from the neutral axis. Beam deflection (how much it sags) increases with load and span length and decreases with stiffer materials and better cross-sections.
Compare the stiffness of a flat ruler held horizontally vs. turned on its edge. The same piece of material is dramatically stiffer when oriented with more depth. Test different cross-section shapes (flat, I-beam, tube, channel) made from the same material by loading them and measuring deflection. Calculate the ratio of strength-to-weight for each shape. Discuss why floor joists are tall and narrow rather than short and wide.
Take a thin wooden ruler and hold it flat between two supports (like two stacks of books). Press down in the middle -- it bends easily. Now turn the same ruler on its edge and press down again. It barely bends at all. The material has not changed. The amount of material has not changed. What changed is the orientation of the cross-section relative to the load, and this simple observation unlocks one of the most important concepts in structural engineering.
When a beam bends, it is not experiencing a single type of force -- it is experiencing tension and compression simultaneously. The bottom surface stretches (tension) and the top surface compresses. Right in the middle is the neutral axis, where the material is neither stretched nor compressed. Material near the neutral axis contributes almost nothing to bending resistance because it is barely stressed. Material far from the neutral axis carries the highest stress and does the most work resisting the bend.
This is why the I-beam is the iconic shape of structural engineering. An I-beam concentrates material in the top and bottom flanges (far from the neutral axis) and uses only a thin web to connect them. Compared to a solid rectangular beam of the same weight, an I-beam can be several times stiffer and stronger. The principle is the same as the ruler experiment: move material away from the center and toward the extremes, and bending resistance increases dramatically.
The geometric property that captures this effect is called the moment of inertia (or second moment of area). You do not need to calculate it at this level, but the concept is important: it depends on how far the material is from the neutral axis, and it goes as the distance cubed. This means that doubling the depth of a beam (while keeping the same area of material) increases its bending stiffness by roughly eight times. That is why floor joists are tall and narrow -- a 2x10 lumber joist is far stiffer than a 5x4 of the same cross-sectional area.
Deflection -- how much a beam sags under load -- depends on four things: the load (more load, more sag), the span length (longer span, much more sag -- it goes as length cubed), the material stiffness (stiffer material, less sag), and the cross-section shape (higher moment of inertia, less sag). Engineering requirements typically specify maximum allowable deflection: a floor beam might be limited to sagging no more than 1/360 of its span length to prevent cracking of ceiling plaster or a bouncy feeling underfoot.