In this paper, we will define optimization, linear programming, and the duality of linear programming and demonstrate them in practice through several examples in which the Python language was used to display the final outputs using codes for various libraries. We will also illustrate the method of approximation to Tyler by defining the strategy and demonstrating it in practice through an example.