The ridge is the horizontal line or peak formed where two sloping roof surfaces intersect. It serves as the highest point of the roof, aiding in water drainage and enhancing structural stability, while also contributing to the overall aesthetic of the building.