If you have an I ‘i’ cross section cantilever beam and you want to make it stiffer. Do you increase the height or width

Making a cantilever beam stiffer involves reducing deflection. Deflection depends on the following equation:

The cross section relates directly to the area moment of inertia. As such, looking at the following equations below, an “I” cross-section relates to a square, just without the excess material. Increasing the height would have a factor of 3 as opposed to the width, which has a factor of 1.

I-beams are used very commonly in structural applications since you’re able to optimize the strength-to-weight ratio of the cross-section.

This is a good answer, I just wanted to add on to it a bit in a simpler way. Generally speaking, the more mass you can get farther away from the bending axis, the stiffer the material will be. I beams are already optimized to do this. If you wanted to make it even stiffer, you could just add more thickness to the top and bottom flanges of the beam; or you can increase the height to shift the mass you do have farther away.