The ancient Chinese alchemists were looking for a way to become immortal when they discovered a match that relied on friction to strike a flame. It spread in China but it never really moved on or spread outside of China.
In Europe and other places in the world had to use things like the magnifying glass to focus the suns rays on some tinder to make fire and that only worked when it was really sunny out and most of the time if it is sunny you don’t want a fire. You could also use flint and steel which was normally used in guns.
The European alchemists like Robert Boyle made different kinds of chemical matches in the 1600s when alchemy was turning into chemistry. Lots of people smoked tobacco in a pipe so lots of people wanted an easy way to light their pipe. One of the chemical fire starters was a small glass capsule filled with chemicals so that when you crushed the glass container a fire would start but this fire starter was never used was it didn’t succeed commercially and it couldn’t be mass produced.
A man named John Walker learned and apprenticed to be a surgeon but, understandably, he couldn’t handle the blood and gore so he quit but didn’t want to throw away his education so he became a pharmacist which is basically a chemist. Walker was also interested in fire and knew the answer to a good fire starter was chemistry. He was stirring chemicals together and tossed the stick aside and the stick then ignited.
The safety match vs the strike anywhere match. The safety match contains potassium chloride and the red bumpy part on the box that you light the match on contains red phosphorus which combine and the friction makes a fire. The strike anywhere match contains both potassium chloride and red phosphorus in the red part but the white part contains little shards of glass which make a spark lighting the red phosphorus and potassium chloride.