  These notes are a summary of lectures given at the Instituto de Astronomia of
the Universidad Nacional Autonoma de Mexico (UNAM), the Dipartimento di Fisica
of the Universita degli studi di Salerno (Italy), and the Instituto de Fisica
Corpuscular of the Universitat de Valencia (Spain) during the year 2012. Basic
mathematical aspects of Palatini theories of gravity, which are constructed
assuming that metric and connection are independent geometrical entities, are
briefly introduced and discussed, and followed by a detailed derivation of the
field equations of some rather general Lagrangian theories. Applications to the
early universe are considered paying special attention to the avoidance of the
big bang singularity. The analysis of non-singular cosmologies carried out in
arXiv:1005.4136 [gr-qc] is extended to include several perfect fluids.
