At the local Church of St. Francis, he became a pupil of the famed musician, Friar Giovanni Battista Martini, O.F.M.
Following his period of novitiate, he was named his mentor's assistant and substitute conductor of the famed girls choir at the church and succeeded him in that position upon his death in 1784.
[2] During the occupation of Italy by the French Revolutionary Army, the friary was suppressed and the community of friars scattered.
[2] Mattei's music bears a close resemblance to the style of composition of Martini, his mentor.
In 1804 he was appointed as a professor at the Liceo Musicale di Bologna (now the Conservatorio Giovanni Battista Martini), where he had among his pupils Gaetano Donizetti, Yevstigney Fomin, Angelo Mariani, Giuseppe Vianesi, Francesco Morlacchi, Luigi Felice Rossi, Gioachino Rossini, Giovanni Tadolini, and Christian Theodor Weinlig.