These notes give an introduction to the mathematical framework of the Batalin-Vilkovisky and Batalin-Fradkin-Vilkovisky formalisms. Some of the presented content was given as a mini course by the first author at the 2018 QSPACE conference in Benasque.