Determining the values and equation of a line