One diagram to hold all three lines
Picture one graph with expected return on the vertical axis and risk on the horizontal axis, built up in three layers. Layer one is the efficient frontier, a curve of risky-asset combinations bulging up and to the left; a CAL is any straight line from Rf that touches that curve at a chosen risky portfolio.
Layer two swaps in the market portfolio as the tangency point, turning that particular CAL into the CML: the steepest possible line from Rf that still touches the efficient frontier, because the market portfolio is the most efficient risky portfolio available.
Layer three redraws the x-axis as beta instead of standard deviation and replots every asset, efficient or not, along the SML. The market portfolio still sits on this line too (its beta is 1 by definition), which is the visual anchor that ties CML and SML back together even though their axes are different.
In short, the three layers stack like this:
- Efficient frontier: the universe of possible risky-asset combinations.
- CAL / CML: a straight line from Rf to one chosen risky portfolio (CML if that portfolio is the market).
- SML: the same story replotted on a beta axis, so any asset can be priced, diversified or not.