We review the BV formalism in the context of 0-dimensional gauge theories. For a gauge theory (X0,S0) with an affine configuration space X0, we describe an algorithm to construct a corresponding extended theory (̃X,̃S), obtained by introducing ghost and anti-ghost fields, with ̃S a solution of the classical master equation in 𝒪̃X. This construction is the first step to define the (gauge-fixed) BRST cohomology complex associated to (̃X,̃S), which encodes many interesting information on the initial gauge theory (X0,S0). The second part of this article is devoted to the application of this method to a matrix model endowed with a U(2)-gauge symmetry, explicitly determining the corresponding ̃X and the general solution ̃S of the classical master equation for the model.