We study complex involutive algebras generated by a single nonselfadjoint idempotent and use them to construct a family of algebras,which we call planar Lyapunov algebras.As our main result,we prove that every 2-dimensional commutative real algebra whose homogeneous Riccati differential equation is stable at the origin must be isomorphic either to an algebra with zero multiplication or to some planar Lyapunov algebra.