To write an equation for a piecewise linear function, the correct answer is:
4. the equation of each linear segment and the interval for which it applies.
This is because a piecewise linear function consists of multiple linear segments, each defined by its own equation, and you need to specify the intervals on the x-axis over which each of these segments is valid.