The accounting equation is at the root of transaction analysis in business. When a business executes any transaction -- a sale to a customer, a purchase, a debt payment, a stock sale -- the accounting equation must remain in balance. If the equation isn't balanced, this indicates that the analysis is incomplete or incorrect.
The accounting equation states that the total value of a business's assets must always equal the combined value of its liabilities and its owners' equity (or stockholders' equity in the case of a corporation). Written in mathematical style: Assets = Liabilities + Equity. If a transaction changes the total value on one side of the equation, the other side must change by an equal amount. The rules for financial accounting ensure that the equation will remain in balance.
Many transactions affect only one side of the equation, but as long as the total value on that side doesn't change, then the equation remains in balance. For example, cash and inventory are both assets. If your business spends $1,000 to replenish its inventory, your total assets remain the same; you have $1,000 less in cash but an additional $1,000 worth of goods in inventory. Similarly, if you spend $10,000 on a new piece of machinery, your total assets are unchanged; you have $10,000 less in cash but an additional $10,000 worth of "property, plant and equipment," another asset category. Nothing happens on the liabilities/equity side of the equation.
Say that instead of paying $1,000 cash for inventory, you bought those goods on credit from your vendor. Inventory goes up by $1,000. You now owe your vendor $1,000. Because you're under an obligation to pay that money, it's a liability (accounts payable, to be specific). Assets and liabilities have both increased by $1,000, so the equation remains in balance. Or say that instead of paying $10,000 cash for your new equipment, you borrowed the money. That loan is also a liability (a note payable). Assets and liabilities have both increased by $10,000, and the equation is balanced. Later, when you repay a debt, your cash balance and the debt liability both decline by an equal amount.
Companies can sell pieces of ownership to raise money. Say your company sells 1,000 shares of stock for $20 each. The company gets $20,000 cash, so assets increase by $20,000. On the other side of the equation, the $20,000 represents money invested in the company by stockholders -- it's stockholders' equity, in other words. Equity rises by $20,000, and the equation is balanced.
The most common transaction that the typical business engages in is a sale to a customer. Say your company buys items from a vendor for $8 and sells them to customers for $10. When you sell an item, you get $10 in revenue. On the asset side, either cash or accounts receivable increases by $10. Also on the asset side, the value of inventory decreases by $8, which is the cost of the item you sold. So the net increase in assets is $2. The transaction appears on your income statement as $10 in revenue (the sale price) and an $8 expense (the cost of the item sold), for a net profit of $2. That $2 flows to owners' equity. Assets and equity have both risen by $2, so the equation is balanced.