In phasor or vector diagram, a capacitor that is parallel to the supply can improve power factor. I know this is practically true but I don't understand the mathematical equation:

The total impedance (Z) of the following circuit has imaginary part i=root(-1). That means it has a reactants and it will consume reactive power. 


If XL = Xc , the reacance should be infinity or has a very large value so it will consume large reactive power. 

I feel like algebra does not support phasor diagram... Would you tell me what I'm missing? 

Thank you,
[![enter image description here][1]][1]


**Edit:**


**Here is the opposite case:**

If a very high reactance is good for power factor, Here is a circuit with a very low reactance. Does it also improve power factor? If yes, which one is better?
[![enter image description here][2]][2]


  [1]: https://i.sstatic.net/sloGz.jpg
  [2]: https://i.sstatic.net/CvV9O.jpg