The matching principle is a culmination of accrual accounting and the revenue recognition principle. They both determine the accounting period, in which revenues and expenses are recognized. According to the principle, expenses are recognized when obligations are (1) incurred (usually when goods are transferred or services rendered, e.g. sold), and (2) offset against recognized revenues, which were generated from those expenses (related on the cause-and-effect basis), no matter when cash is paid out. In cash accounting—in contrast—expenses are recognized when cash is paid out, no matter when obligations are incurred through transfer of goods or rendition of services: e.g., sale.
If no cause-and-effect relationship exists (e.g., a sale is impossible), costs are recognized as expenses in the accounting period they expired: i.e., when have been used up or consumed (e.g., of spoiled, dated, or substandard goods, or not demanded services). Prepaid expenses are not recognized as expenses, but as assets until one of the qualifying conditions is met resulting in a recognition as expenses. Lastly, if no connection with revenues can be established, costs are recognized immediately as expenses (e.g., general administrative and research and development costs).