directed segment
Let $AB$ a line segment^{}. The directed segment $\overline{AB}$ is to be taken the segment $AB$ with a direction (similar^{} to vectors). The defining property is then
$$\overline{AB}=\overline{BA},$$ 
(which relates to the property of vectors stating that $v$ and $v$ have opposite direction and same modulus).
The addition^{} of directed segments is done in a similar fashion of vectors, so the above relation^{} is equivalent^{} to
$$\overline{AB}+\overline{BA}=0.$$ 
where $0$ represents any segment of the form $\overline{PP}$. If it is stated that we will work with directed segments, it’s customary to omit the overlining and to just write $AB$, convention we will follow now.
Notes.

•
The definition does not says $AB$ is either positive or negative (and it does not really matters doing so). It merely states that traveling the segment on different directions give different signs.

•
It does not make sense to compare signs of noncollinear segments. So if $A,B,C$ are not on the same line (or parallel lines^{}) we cannot relate the signs of $AB,BC$ and $CA$.
It can be proved considering cases that no matter the relative position of three points $A,B,C$ on a line, the following equality holds:
$$AB+BC=AC.$$ 
In the above picture $AP+PB=AB$. Notice that $AB$ goes to the left since $AB$ is the segment that starts at $A$ and ends at $B$. Also, taking $A=C$ gives $AB+BA=AA=0$ which is consistent with the earlier remarks.
Just like undirected segments in Euclidean geometry^{} (and unlike vectors), directed segments can be divided to obtain a ratio. Such ratio is the number obtained dividing the undirected segments, but taking signs int oaccount (ratio of two segments with the same direction is positive, and negative otherwise).
Given two points $A,B$ on a line, we can locate any other point $P$ on the line considering the ratio $AP/PB$. In other words, $P=Q$ if and only if $AP/PB=AQ/QB$. Moreover, to each point $P$ corresponds an extended ^{1}^{1}We use extended reals to avoid dealing with separate cases, allowing us to deal also with points at infinity. real $r=AP/PB$ and to each extended real $r$ corresponds a point $P$ such that $r=AP/PB$.
Notice that $AP/PB$ is positive when $AP$ and $PB$ have the same direction, which happens if and only if $p$ is between $A$ and $B$. If $P$ lies outside $AP$, then $AP$ and $PB$ have negative signs and so the ratio will be negative.
Title  directed segment 

Canonical name  DirectedSegment 
Date of creation  20130322 14:56:59 
Last modified on  20130322 14:56:59 
Owner  drini (3) 
Last modified by  drini (3) 
Numerical id  9 
Author  drini (3) 
Entry type  Definition 
Classification  msc 51F99 
Classification  msc 51M25 
Related topic  CevasTheorem 
Related topic  Midpoint^{} 