Definition: Length of an Interval (Convex Set) in $\mathbb R$ I think I know the answer, but I'm looking for a reference that confirms it.
A "proper" interval of an ordered set X as defined by Munkres Topology p.84 is a set limited by $a, b \in X$ with $a < b$ and contains all points $x \in X$ with $ a \lt/\le x \lt/\le b$ with $\lt/\le$ giving open, closed, or half-open intervals.
Other authors extend the usage of an interval of $\mathbb R$ to include all types of convex sets. So as well as the four "proper" intervals they add the four rays (upward / downward pointing, open/closed), $\mathbb R$ itself, singleton sets and the empty set.
By my understanding, the length of a "proper" interval is the difference of its sup and inf (i.e. $b - a$ whether present in the set or not); the length of singletons and the empty set is zero; and the length of $\mathbb R$ and the rays is $\infty$.
Maths is a subject of precision, and as noted I'm looking for an authoritative confirmation (or correction).

The field of mathematics that deals with concepts like "length" is called Measure theory.
Measure theory takes a family of sets that satisfies some properties (called a $\sigma$-algebra and assigns a "measure" to each of the sets in the family.
A very specific measure called the Lebesgue measure is very often used on sets of $\mathbb R$, and this particular measure defines the length of an interval $[a,b]$ as $b-a$, so yes, you are correct.
