Males have an elongated ray on their dorsal fin. In plain English, they have a spike on their back whereas the females do not.

My female spotted mandarin chases my female green mandarin. The green doesn't fight back, so I don't classify it as fighting.