As I understand things, airlines generally give discounts for round-trips that consist of a flight from A to B followed by a flight from B to A. How does this logic work for multi-city flights? As an example (but don't focus strictly on this example), what about a flight from A to B followed by a flight from C back to A? What logic is applied to determine whether to charge as separate one-way trips or as a discounted multi-city trip? Is the important part that the trip begin and end in the same space, or does there need to be an unbroken cycle?
I know I can prod travel search engines for specific examples, but if I understand the rules it can help in my search. Is this airline dependent? Does it matter whether the flights are domestic or international (I'm only concerned here about domestic)?