This paper discusses the numerical exponential instability of the transfer matrix method (TMM) in the framework of the symmetry formalism. This numerical weakness is attributed to a series of increasingly extreme exponentials that appear in the TMM when it is applied to geometries involving total internal reflection (TIR) or very high absorption. We design a TMM formalism that identifies the internal symmetries of the multilayer geometry. These symmetries suggest particular transformations of a reference system in the TMM that improve its ill-conditioned exponentials. To illustrate the numerical improvements, we present examples with calculations of electric fields.Nordic Innovation Center 09053Ministerio de Economía y Competitividad MAT2011-23593, CSD2007-00007Junta de Andalucía FQM- 3579, FQM-524