= white, minimum size = 4mm \] (1) [1]{}; (2) \[left of=1\] [2]{}; (3) \[left of=2\] [3]{}; (4) \[left of=3\] [4]{};

\(1) edge \[loop above\] node (1); (2) edge \[loop above\] node (2); (3) edge \[loop above\] node (3); (4) edge \[loop above\] node (4); (1) edge node (2); (2) edge node (1); (3) edge node (2); (2) edge node (3); (3) edge node (4); (4) edge node (3);

Then, $A$ is a primitive matrix, because $$A^3 = \begin{pmatrix}
    4&5&3&1\\5&7&6&3\\3&6&5&7\\1&3&5&4
    \end{pmatrix} >0.$$

However the converse is not true. Indeed if one considers the matrix $$B = 
    \begin{pmatrix}
        0&1\\1&0
    \end{pmatrix},$$ then $1\rightarrow2$ and $2\rightarrow1$ (see fig. \[fig:graph\_non\_primitive\_matrix\]).

=\[ draw = black, thick, fill = white, minimum size = 4mm \] (1) [1]{}; (2) \[left of=1\] [2]{};

\(1) edge node (2); (2) edge node (1);

Nevertheless, $B$ is not a primitive matrix because for all $k \in \mathbb{N}$, $$B =
\left\{
    \begin{array}{ll}
        B  & \mbox{if $k$ is odd}, \\
        I_2 & \mbox{if $k$ is even}.
    \end{array}
\right.$$

According to Perron-Frobenius theorem, one has

Let $A \in \mathcal{M}_N(\mathbb{R})$ be a primitive stochastic matrix. $1$ is an eigenvalues of A, and all the other eigenvalues are less than 1 in modulus. \[p&lt;1\]

We can 