In Brilliant.org as well as Wikipedia, the definition of stationary distribution of Markov chain is $\pi P = \pi$, in which $\pi$ a state distribution and $P$ the transition matrix. Why was it defined that way?
I think it makes way more sense if it is defined as $P\pi$, since by the definition of matrix multiplication, $P\pi$ means $P$ transforms $\pi$ versus a distribution transform the transition matrix.
My guess is that it is due to the defition of transition matrix. According to 11.1.2 here, row $i$ of the transition matrix lays out the probability of what happen after state $i$. Therefore, we want $pi$ to be a row matrix, and in order to make the shape compatible in multiplication, it must be $\pi P$ instead of $P\pi$. However, I could not see which is more correct.
It was defined that way because the $(i,j)$-th entry of transition matrix $P$ was defined in a certain way, namely, that $p_{ij}$ is the probability of jumping from state $i$ to state $j$ (rather than from state $j$ to state $i$).
It feels strange to have the vector-matrix multiplication $\rm v^\top M$ instead of the more common matrix-vector multiplication $\rm M v$ because you're used to reading function composition from right to left ;-)