The Markowitz model generates an efficient frontier of optimal portfolios that maximize return for a given level of risk. The Capital Asset Pricing Model (CAPM) builds on this by deriving the security market line (SML) which plots the expected return of individual securities based on their beta coefficient in relation to the market portfolio. The capital market line (CML) extends the efficient frontier by including a risk-free asset, demonstrating how investors can optimize the trade-off between risk and return through borrowing and lending at the risk-free rate.