Suppose that I have the segment between the points (2, 2) and (3, 4). Empirically, drawing on a piece of paper, I can say that "doubling" the segment leads me to the segment (2, 2), (4, 6) and making it three times as long is (2, 2) and (5, 8).
What's the formula behind this? Thanks
Name the points $P,Q$. In your example $P=(2,2)$ and $Q=(3,4)$. You are asking how to lengthen the segment $PQ$ by a factor of $n$, keeping one endpoint at $P$. Here's how you compute the opposite endpoint.
First compute the difference vector: $$Q-P $$ Multiply it by $n$ (scalar multiplication): $$n(Q-P) $$ and add that to $P$: $$P + n(Q-P) = nQ + (1-n)P $$ so with your tripling example you get opposite endpoint $$3(3,4) - 2(2,2) = (5,8) $$