I know that Plato formulated the law, "like attracts like", using the Greek word philia for attraction. This is mentioned somewhere in the Republic, and is easy to verify with a Google search.
But what about the law, "opposites attract"? We know about this law from chemistry (ionic bonds) and magnetism (magnetic poles) but was there a similar formulation in antiquity, especially regarding human bonds such as friendship or marriage?
I read that 20th century sociology applied "opposites attract" to social contexts, but I'm more interested to know whether Greek and Roman philosophers did, too.
I also read (on this webpage) that the ancient Greeks were aware of magnets and the fact that opposite poles attract. Did they ever apply this principle to a social context?