A great way to show this in your story is to showcase the following elements that both your hero and villain should share.
We all have unique personalities. Some days we're awesome and some days we're quick to temper and kind of miserable.
When writing your villain, you're actually using the personality of the hero, but spotlighting all less desirable traits, thereby showing what your hero could become if he makes the wrong choices and vice versa.
2. ValuesHeroes and villains can have the same value systems, in fact stories are richer for it as opposed to having a soulless bad guy. The reader will have a greater connection with the villain if his motives feel rational. When both the villain and the hero fight for what they believe in the drama is two fold.
3. GoalsThis is probably the most dramatic trait you can create between your protagonist and antagonist. A shared goal is what creates conflict and provides a reason why these two characters keep crossing paths.
Why is this important?
Because the easiest way to get to know your characters is to find out what they want and why. In order to create worthy opponents start making a list of the things they have in common. You'll discover this provides a framework for adding depth to your characters and the plot.