The gesture dates back to Ancient Greece and it was also used in Ancient Rome. Historically, it represented the phallus. In some modern cultures, it has gained increasing recognition as a sign of disrespect, and has been used by music artists (notably more common among hardcore punk bands and rappers), actors, celebrities, athletes, and politicians. Most still view the gesture as obscene. The index finger and ring finger besides the middle finger in more contemporary periods has been likened to represent the testicles.
who invented the meaning of the middle finger
Ancient Greece