Breach, infraction, violation, transgression, trespass, infringement, contravention are comparable when denoting the act or the offense of one who fails to keep the law or to do what the law, one's duty, or an obligation requires.
Breach occurs rarely by itself except in phrases such as "a law more honored in the breach than in the observance."
The word is usually followed by o/and a noun or pronoun which indicates the thing which is broken or not kept.
Infraction is now more often used than breach (except in certain time-honored idioms) for a breaking of a law or obligation.
Violation adds to breach and infraction the implication of flagrant disregard of the law or of the rights of others and often suggests the exercise of force or violence; thus, the violation of a treaty suggests positive, often aggressive and injurious action, while its infraction may imply a mere failure strictly to adhere to its terms.
Transgression is applied to any act that goes beyond the limits prescribed by a law, rule, or order; often the term is used specifically of an infraction of the moral law or of one of the commandments.
Trespass also implies an overstepping of prescribed bounds, but it carries in addition a strong implication of encroachment upon the rights, the comfort, or the property of others. In Scriptural and religious use a trespass is particularly an offense against God or one's neighbor.
In law a trespass is an unlawful act, involving some degree of force or violence, committed against the person, the property, or the rights of another.
Infringement is sometimes used as though it were identical in meaning with infraction.
More often it implies trespass rather than violation and therefore is the idiomatic term when trespass involving an encroachment upon a legally protected right or privilege is at issue; thus, the unauthorized manufacture of something which has been patented constitutes an infringement (rather than an infraction or violation) of a patent.
Contravention applies specifically to a going contrary to the intent of the law or to an act in defiance of what is regarded as right, lawful, or obligatory.