(a) A unital Banach algebra, except the algebra of complex numbers, without nontrivial idempotent.

(b) A unital Banach algebra with a nontrivial idempotent. (Recall that 0 and 1 are called trivial idempotents.)

******************************

We show that the Banach algebra C(X) has no nontrivial idempotent iff X is connected: Let 0 ≠ f ≠ 1 be an idempotent. Then X = f^{−1}({0}) ∪ f^{−1}({1}) implies that X is not connected. Conversely if X is disconnected and X = G_{1} ∪ G_{2} with open disjoint sets G_{1} and G_{2}, then f(x) = \{ \begin{matrix}1 & x ∈ G_{1} \\ 0 & x ∈ G_{2} \end{matrix} is a trivial

idempotent of C(X).

Comment. If A is a (not necessarily commutative) Banach algebra with an element a ∈ A such that sp(a) is not connected, then A has a nontrivial idempotent. (cf. [B&D, Remarks of Prop. 7.9 ])

Ref. [B&D] F.F. Bonsall, J. Duncan, complet normed algebras, Springer-Verlag,1973.