
When primary amines reacts with excess of alkyl halide, it quaternize the starting amines to form quaternary ammonium salt.
Above reaction is known as Hoffmann’s
reaction prefer less substituted alkene, an example of kinetically control product. If we study stereochemistry a preference of trans-periplanar (Anti)-elimination of the H and the amine. It shows, E2 mechanism with anti stereochemistry.
By simply quaternizing the 1° amines with an excess (> 3 equivalents) of alkyl halide is also known as Hoffmann’s exhaustive alkylation. For example
In this example anti-elimination requires loss of one of the

which is trans to the nitrogen not cis

. This can be given by chair conformation where nitrogen is axial, so above product can formed.
