I have to prove that $\mu_\pi=r+\beta_\pi(\mu_M-r)$, (where $\mu_\pi$ is the expected return of a portfolio, $r$ is the interest rate, $\beta_\pi$ is the beta factor of the portfolio, and $\mu_M$ is the expected return of the market), using the CAPM formula, which states that $\mu_i=r+\beta_i(\mu_M-r)$ for any asset $i$.
I already proved that $\beta_\pi=\sum_{i=1}^N(\pi_i\beta_i)$ and I think I am supposed to use this in my proof.
I started by substituting in:
$\mu_\pi=r+\beta_\pi(\mu_M-r)$ => $\sum_{i=1}^N(\pi_i\mu_i)=r+\sum_{i=1}^N(\pi_i\beta_i)(\mu_M-r)$ but I am not sure how to proceed or if this is the right approach.
Thank you for your help