Derivation of Autocovariance Function of First-Order Autoregressive Process In my textbook, the autocovariance of the AR(1) model is derived as such:
$$Y_t=\phi Y_{t-1}+e_t$$
After multiplying both sides by $Y_{t-k}(k=1,2,...)$ and take expected values, you get:
$$E(Y_{t-k}Y_t)=\phi E(Y_{t-k}Y_{t-1})+E(e_tY_{t-k})$$
which implies that
$$\gamma_k=\phi\gamma_{k-1}+E(e_tY_{t-k})$$
However, I don't understand how $E(Y_{t-k}Y_t)$ becomes $\gamma_k$ and how $\phi E(Y_{t-k}Y_{t-1})$ becomes $\phi\gamma_{k-1}$.

Firstly, we note that $\gamma_k \equiv \mathbb{Cov}(Y_t, Y_{t-k})$ is the covariance function, which holds for all $t$ and $k$.  Secondly, there is no mean term in the model, so we have $\mathbb{E}(Y_t)=0$ for all $t$.  Putting these together and using a standard decomposition for the covariance, for any $t$, $k$ and $\ell$ we have:
$$\begin{align}
\mathbb{E}(Y_{t-k}Y_{t-\ell})
&= \mathbb{Cov}(Y_{t-k}, Y_{t-\ell}) + \mathbb{E}(Y_{t-k}) \mathbb{E}(Y_{t-\ell}) \\[6pt]
&= \gamma_{(t-\ell)-(t-k)} + 0 \times 0 \\[6pt]
&= \gamma_{k-\ell}. \\[6pt]
\end{align}$$
This result encompasses both the results you are considering.
