Friction always does negative work: it slows bodies down, converting kinetic energy into thermal energy. It’s not a “loss” of energy but an irreversible transformation: the body and the surface heat up. Here we see how friction appears in the bubble diagram and how the thermal energy produced is quantified.