Physically v can categorise a particle into solid, liquid or a gas.
Fire does not come into any of the above given categories, though it is the result of burning of some form of matter, I'm not sure if the resultant obtained stuff is matter.
Reasons 4 not being matter
1) u can extinguish a candle flame with ur finger - ultimately whats left between ur fingers after u extinguish the flame is nothing (i.e the volume), and there is no mass too which suggests it is not matter.
2) Different layers of burning ( ever noticed diff colours in a candle flame ???? ), matter though not always burns uniformly, but the resultant obtained flame is unicoloured.
Reason why it is matter
1) Everything that occupies space is matter - till the candle flame is not put off, observe that the space occupied by the flame is at the expense of burning some atmospheric gases, so the volume by which the atmospheric gases are burnt is the instantaneous volume of the flame, which ultimately means it is matter.