Abstract: One of the main purposes of quantum field theory is to compute the scattering matrix (S-matrix) that describes collisions between particles. General assumptions on its properties determine the S-matrix of two scalar particles in terms of a set of analytic functions of one variable (in two dimensions) and two variables (in four dimensions). Recently there has been some interesting developments in understanding the space of allowed S-matrices. In this talk I will discuss first the case of two dimensions where progress can be made using a combination of numerical tools from the theory of conic optimization and analytical tools from functional and complex analysis. The result is that the space is convex with a boundary that has vertices where interesting theories are found. When such distinguished point is located, the corresponding S-matrix follows numerically without any further input. Afterwards I will discuss recent ideas to extend this to 4 dimensions.