1. behave in an inappropriate or unacceptable manner
you should apologize. You were totally out of line.
In a literal sense, to 'be out of line' means to not be correctly positioned in a row of other people or things. This phrase takes that meaning and uses it to figuratively express doing or saying something that goes against a direct order, that causes offence, or that is not considered acceptable in a particular situation. It is common in both a social and professional context, though in the UK you may hear the variation 'be out of order' instead.