Final answer:
Mechanical energy is conserved in a system when no external dissipative forces are present and all work is done by conservative forces. In such a closed system, the total mechanical energy remains constant.
Step-by-step explanation:
Mechanical energy within a system is conserved when there are no external dissipative forces such as friction or air resistance acting on the system, and when all forces doing work are conservative. In a closed system, or in the absence of such forces, the Law of Conservation of Mechanical Energy states that the total mechanical energy, which is the sum of gravitational potential energy and kinetic energy, remains constant. This implies that in scenarios where non-conservative forces like friction are present and doing work, mechanical energy is not conserved since these forces cause energy to be transformed into forms that are not mechanical, such as heat.