Mahdi was born on 1 January 1970. He received his Bachelors degree in chemical engineering from University of Toronto, Canada, and his Masters in the same field from the Illinois Institute of Technology, USA. Mahdi received his PhD in chemical engineering from Northwestern University, USA, where he specialized on applications of statistical mechanics on complex thermodynamic systems working with Professor Monica Olvera de la Cruz research group.