An altitude of a triangle is the perpendicular segment from a vertex of a triangle to the opposite side (or the line containing the opposite side).
An altitude of a triangle can be a side or may lie outside the triangle.