In 1868 he was awarded a bachelor's degree from the Università di Modena, then an engineering degree from the Politecnico di Milano. Between 1868 and 1877 he worked as an assistant at the Modena Observatory, teaching mathematics and physics at the Università di Modena. He taught at Naples and then Palermo, where he also worked at the observatory.