In Bremaud's book about markov chains is stated:
If A is stochastic but not irreducible, then the algebraic and geometric multiplicities of the eigenvalue 1 are equal to the number of communication classes.
But I think that's not true.
Consider two states $\{1,2\}$ with transition matrix $P=\begin{pmatrix}0&1\\0&1\end{pmatrix}$. P is stochastic and not irreducible. There are $2$ communication classes $\{1\}$ and $\{2\}$.
But $1$ is a simple eigenvalue of $P$, so algebraic multplicity of eigenvalue 1 =$1\ne2$=number of communication classes.
Did I missunderstand something?
EDIT 1. I wrote too fast. There are two communication classes: $\{1\}$ and $\{2\}$.
cf. https://en.wikipedia.org/wiki/Markov_chain#Reducibility
Indeed, by definition, each state communicates with itself and moreover, the classes constitute a partition of the set of states. The states $1$ and $2$ do not communicate because $1$ is not accessible from $2$. Finally $\{2\}$ is a closed class and $\{1\}$ is not.
About your second example (cf. your first comment), one has exactly the same result.
EDIT 2. I do many mistakes. I think that your second comment is true. I have only that follows:
One has the following .
Proposition. If $A$ admits $r$ closed classes, then its eigenvalue $1$ has a multiplicity $\geq r$.
Proof. Assume that $\{1,\cdots,k\}$ is a closed class (no out-arrows). Then $A$ is of the form: $\begin{pmatrix}B&0\\C&D\end{pmatrix}$ where $B$ is stochastic and irreducible. Then the eigenvalue $\rho(B)=1$ is simple and is also an eigenvalue of $A$.