Two vector in 2-dimensional space:
$$ \begin{aligned} A &= (a_1, a_2), \text{ in }\mathbb{R}^2\\ B &= (b_1, b_2), \text{ in }\mathbb{R}^2 \end{aligned}$$
Then a line segment going from A to B can be defined as:
$$r = \vec{oa} + \lambda \vec{ab}$$
This is simply the adition of the vector $a$ with a part of the vector going from $a$ to $b$
We know from the section on vector math that the vector going from $a$ to $b$ is equal to $b-a$ and thus we can write:
$$\begin{aligned} r &= \vec{OA} + \lambda \vec{AB}\\ &= \mathbf{a} + {\lambda}(\mathbf{b}-\mathbf{a}) \\ &= \mathbf{a} + {\lambda}\mathbf{b}-{\lambda}\mathbf{a} \\ &= (1-{\lambda})\mathbf{a} + {\lambda}\mathbf{b} \\ &= ((1-{\lambda})a1 + {\lambda}b1, (1-{\lambda})a2 + {\lambda}b2) \\ \end{aligned}$$
A sample:
You can drag the two red dots to change the endpoints $A$ and $B$ of the lnesegment.
Change the value of $\lambda$ by dragging the slider:
In a Euclidean space, a convex region is a region where, for every pair of points within the region, every point on the straight line segment that joins the pair of points is also within the region
If the region is not convext (see above for the definition) then it is concave.