# Rules of addition of electric field

According to the principle of superposition of Electric Fields , we know that Electric fields add using laws of vectors. However while adding the electric fields , if for example one field is generated due to repulsion between two point charges and another field is generated due to attraction between two point charges , both of them pointing in the same direction and having the same magnitude , would they cancel each other out because one is attractive and the other is repulsive, or would they add up because they’re vectors pointing in the same direction?

• For vectors ( here $\vec{E}$ ) , they add up obeying $R=\sqrt{P^2+Q^2+2PQ\cos\alpha}$ ... The case of attraction or repulsion is managed by $\alpha$ ... – Nehal Samee Jun 14 '18 at 8:34
• @Nehal thank you ! So you mean that in this case they will add up even if they’re repulsive? – user198322 Jun 14 '18 at 8:41
• they would add up because they’re vectors pointing in the same direction. The fact that one is attractive and one is repulsive is already taken care of in the direction, which is the direction in which a +ve test charge would move. – sammy gerbil Jun 14 '18 at 8:55
• @sammygerbil ohh you’re right !! Now I understood the reason ! Thanks a lot :) – user198322 Jun 14 '18 at 9:04