The course aims at providing the mathematical foundations for the main computational approaches to programming. These comprise techniques and methods for the numerical solution of linear systems and methods for solving constrained and unconstrained optimization problems. This requires understanding the connections between propositional and predicate logic techniques, sets, functions and relations, and optimization algorithms. The course focuses on presenting the main algorithmic approaches and the underlying mathematical concepts, with attention to the implementation aspects using MATLAB and/or Octave.