At all undergraduate and even most graduate macroeconomics classes, the representative household maximizes its decisions (consumption, savings, labor, etc.) in the economy. The problem with such a model is that it does not have any form of inequality by design. I took a terrific class with Prof Greg Kaplan (and Robin Wu as an excellent TA) that taught me the theoretical models and the computational skills to model heterogenous-agent macroeconomics so as to answer pertinent questions about wealth, income, and consumption inequality. I have attached some graphs from a MATLAB simulation that I ran using endogenous grid points (code available upon request: email me at billcai@uchicago.edu). The model below is for a straightforward infinite-horizon dynamic programming problem involving a distribution of household facing a stochastic autoregressive (of degree one) income process, with a substantial borrowing constraint (think of it as an incomplete markets problem).

Consumption and savings policy functions (zoomed out)

Stationary wealth distribution

Consumption and savings policy functions (zoomed out)

Comparison of wealth, consumption and income inequality