From http://www.economicswebinstitute.org/essays/consumertheory.htm
The standard textbook model of consumer is an outstanding example of the neoclassical paradigm in economics [1]: a h y p e r-rational agent maximises something by choosing an "optimal" bundle of things. Here, the hyper-rational consumer maximises utility (i. e. an overall generic measure of well-being) by exhausting a given budget. He has a pre-defined income to spend on - for simplicity 's sake - two goods, called X and Y, respectively. He could spend his entire income buying only X, thus purchasing a quantity of X equal to income divided by the price of X. Let 's take a numerical example that you find here in the animated graph and that you can replicate with the software: when his income is 50 and the Y price is 10, the consumer can purchase 5 units of Y (higher red point on Y axis). Or he could spend his entire income buying only X - t h e o t h e r g o o d - thus purchasing a quantity of X equal to his income divided by the price of X. If X price is 6, the consumer can purchase at most 8.33 units of X (lower red point). Or he can afford (at most) to buy any combination of quantities of X and Y that costs exactly as the income. These combinations give rise to the budget line you see between the two red points. How to choose? Well, by having a consistent set of judgements about how much utility the consumer will enjoy by consuming each possible bundle of goods.
T h e t y p i c a l w e l l-b e h a v e d s t r u c t u r e o f u t i l i t y o f b u n d l e s i s o f f e r e d b y indifference curves, i.e. all bundles giving the same level of utility to the consumer. Here below you can see two indifference curves: the higher indifference curve is characterised by a higher level of utility.
Now, we should consider - at the same time - both the budget constraint (the