Friction does not always do negative work—it depends on your reference frame and what system you're analyzing. Friction does negative work on an object when it opposes that object's motion relative to the surface it's sliding on. For example, when you slide a book across a table, friction acts opposite to the book's motion, removing kinetic energy from it, which is negative work on the book. However, friction can do positive work on other objects in the system. If you push the book across the table, friction acts forward on the table (Newton's third law pair), doing positive work on the table and heating it. From an energy perspective, friction always dissipates mechanical energy into heat, which is why it's called a non-conservative force. The total mechanical energy of an isolated system decreases due to friction. But in terms of work calculation—using W = F·d—friction's sign depends on whether the frictional force and displacement are in the same direction or opposite directions. When analyzing a specific object, friction typically does negative work because it opposes relative motion. But when considering all objects involved, or when an object moves with a surface due to static friction, the situation becomes more nuanced. For instance, static friction can do positive work on your feet as you walk forward, accelerating them in the direction of motion. The key principle is that friction always opposes relative motion between surfaces, but whether this results in positive or negative work depends on which object and which reference frame you're examining.