Physics of firearms
From the viewpoint of physics
Physics is a natural science that involves the study of matter and its motion through spacetime, along with related concepts such as energy and force. More broadly, it is the general analysis of nature, conducted in order to understand how the universe behaves.Physics is one of the oldest academic...

Dynamics (mechanics)
In the field of physics, the study of the causes of motion and changes in motion is dynamics. In other words the study of forces and why objects are in motion. Dynamics includes the study of the effect of torques on motion...

, to be exact), a firearm
A firearm is a weapon that launches one, or many, projectile at high velocity through confined burning of a propellant. This subsonic burning process is technically known as deflagration, as opposed to supersonic combustion known as a detonation. In older firearms, the propellant was typically...

, as for most weapon
A weapon, arm, or armament is a tool or instrument used with the aim of causing damage or harm to living beings or artificial structures or systems...

s, is a system for delivering maximum destructive energy
In physics, energy is an indirectly observed quantity. It is often understood as the ability a physical system has to do work on other physical systems...

 to the target with minimum delivery of energy on the shooter. The momentum
In classical mechanics, linear momentum or translational momentum is the product of the mass and velocity of an object...

 delivered to the target however cannot be any more than that (due to recoil) on the shooter. This is because the momentum imparted to the bullet is equal to that imparted to the gun-shooter system.
From a thermodynamic point of view, a firearm is a special type of piston engine, or in general heat engine
Heat engine
In thermodynamics, a heat engine is a system that performs the conversion of heat or thermal energy to mechanical work. It does this by bringing a working substance from a high temperature state to a lower temperature state. A heat "source" generates thermal energy that brings the working substance...

 where the bullet has a function of a piston.