From LibreTexts, under CC BY-NC-SA 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.
9.12: Hyphens and Dashes
Opening the book…
Dashes (“—,”) are used to mark an interruption within a sentence, while hyphens (“-“) are used to join two parts of a compound word, or to indicate that a word has been split at the end of a line. A dash is approximately as long as two hyphens.
Dashes are used to mark an interruption within a sentence. They are used in much the same way as parentheses.
Example: Three unlikely companions—a canary, an eagle, and a parrot—flew by my window in an odd flock.
A hyphen joins two parts of a compound word.
Example: governor-elect, twenty-five, half-baked.
Hyphens can also be used to make compound words more understandable. Consider these words:
Man-eating dog
Man eating dog
The first example describes a particular type of dog (man-eating). The second example, alas, suggests that a man is eating a dog.
Or consider the case of the flaming-red pickup truck, as opposed to its more alarming cousin, the flaming red pickup truck.
In general, if the first of two adjectives is describing the second, and not the noun following, you should use a hyphen: deep-blue water, good-tasting hamburger, happy-faced child.