We present two Lie algebroids linked to the construction of the linearizing output of an input affine nonlinear system. The algorithmic development of the linearizing output proceeds inductively, and each stage has two structures, namely a codimension one foliation defined through an integrable 1-form w, and a transversal vectorfield g to the foliation. Each integral manifold of the vectorfield g defines an equivalence class of points. Due to transversality, a leaf of the foliation is chosen to represent these equivalence classes. A Lie groupoid is defined with its base given as the particular chosen leaf and with the product induced by the pseudogroup of diffeomorphisms that preserve equivalence classes generated by the integral manifolds of g. Two Lie algebroids associated with this groupoid are then defined. The theory is illustrated with an example using polynomial automorphisms as particular cases of diffeomorphisms and shows the relation with the Jacobian conjecture. (C) 2019, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved.