While a firearm is not usually left at the scene of a crime, a bullet quite often is found at the crime scene. Fortunately, forensics experts do have a number of techniques and tools at their disposal to identify a bullet from a specific firearm.
A bullet would carefully be collected to initially compare it to a certain firearm. Then, forensics experts would investigate to see if the bullet coincides with the calibre of the firearm in question. After, the bullet would be analysed to see if the rifling impressions pattern is the same pattern of rifling in the barrel of the firearm being investigated. Assuming the two match up on these aspects, forensic scientists would then attempt to match unique, individual characteristics that can transfer from the firearm barrel to the bullet.
The transferred characteristics are quite interesting and actually look a bit like a bar code, due to the pattern of striations and scratches. They are also visible when viewed through a microscope. Inside the gun barrel, there are imperfections that cause striations on the projectiles. If you picture the bullet moving down through the barrel of the gun, unique striations are left on the bullet due to those imperfections on the surface inside the gun. Forensic scientists can look at these patterns through various forensic science procedures.
If police can find a potential weapon used in a crime, forensic experts can then analyse the striations on the bullet, which occurred during its passage through the gun. This allows forensic scientists to run test bullets through the gun to compare the resulting marks with the recovered bullets. In cases where the bullet is too mangled to observe striations or no gun is recovered, police would have to employ other strategies for linking up a suspect with a crime.
You can likely see how a crime involving gunfire can yield important clues that can be utilised to investigate the crime and possibly catch and convict a criminal. With the rapid rate of research into forensic science areas, such as gun identification from recovered bullets, the procedures at the disposal of police and forensic scientists will likely become more sophisticated as well.