# What is the intuition behind the definition of a Markov Chain being $\pi$-invariant?

In Markov Chain literature, one definition is that a chain admits $\pi$ as an invariant distribution if:

$$\forall \ \theta^t \in \mathcal{H} \ \ \int_{\mathcal{H}}\pi(\theta^{t-1})K(\theta^t|\theta^{t-1})d\theta^{t-1} = \pi(\theta^t)$$

where $\theta^1, \theta_2, \ldots$ are sequences of a Markov Chain and $K(\theta^t|\theta^{t-1})$ is a transition or Markov Kernel. In this case, we say that the chain is $\pi$-invariant.

I am wondering if anyone has any intuition here as to why this is the case. My understanding from Stochastic Processes is that if $\lambda P = \lambda$, then $\lambda$ is an invariant distribution for $P$ a transition matrix. However, the above definition confuses me. Does anyone have any ideas how to interpret it?

If you write out $\lambda P = \lambda$ you get $$\sum_i P_{ij} \lambda_i = \lambda_j$$ or in another way, $$\sum_{x_{t-1}} p(x_t \mid x_{t-1}) \lambda(x_{t-1}) = \lambda(x_t)$$ where $\lambda$ is the stationary distribution.
If you replace the sum with an integral and do some more pattern matching, you can see that $\lambda P = \lambda$ is a special case of the integral in your question.