Based on undergraduate material for students in computer science, economics and mathematics, this is an elementary introduction to convex sets and convex functions. Starting from linear inequalities and Fourier Motzkin elimination, the theory is developed with emphasis on concrete computations and examples ending with a chapter on convex optimization with the Karush Kuhn Tucker conditions, quadratic optimization and interior point methods.