Proportions of a Segment

Suppose A and B are points and AB is the line segment joining these points. Now let p be a number between 0 and 1. Can we write a formula for a point C that is "p" of the way from A to B? Examples: If p=0, then C should be at A. If p=0.5, then C should be at the midpoint of AB.

Find the coordinates of A and of B. Check your answer using the other view. Find the distance from A to B. Can you calculate this by hand to check your answer? Find the coordinates of the midpoint of the line segment AB. Move the slider to p=0.5. Where is C?