A cycle expansion for the Lyapunov exponent of a product of random mat
rices is derived. The formula is nonperturbative and numerically effec
tive, which allows the Lyapunov exponent to be computed to high accura
cy. In particular, the free energy and the heat capacity are computed
for the one-dimensional Ising model with quenched disorder. The formul
a is derived by using a Bernoulli dynamical system to mimic the random
ness.