We demonstrate how a static optimal income taxation problem can be analyzed using dynamical methods. Specifically, we show that the taxation problem is intimately connected to the heat equation. Our first result is a new property of the optimal tax which we call the fairness principle. The optimal tax at any income is invariant under a family of properly adjusted Gaussian averages (the heat kernel) of the optimal taxes at other incomes. That is, the optimal tax at a given income is equal to the weighted by the heat kernels average of optimal taxes at other incomes and income densities. Moreover, this averaging happens at every scale tightly linked to each other providing a unified weighting scheme at all income ranges. The fairness principle arises not due to equality considerations but rather it represents an efficient way to smooth the burden of taxes and generated revenues across incomes. Just as nature wants to distribute heat evenly, the optimal way for a government to raise revenues is to distribute the tax burden and raised revenues evenly among individuals. We then construct a gradient flow of taxes -- a dynamic process changing the existing tax system in the direction of the increase in tax revenues -- and show that it takes the form of a heat equation. The fairness principle holds also for the short-term asymptotics of the gradient flow, where the averaging is done over the current taxes. The gradient flow we consider can be viewed as a continuous process of a reform of the nonlinear income tax schedule and thus unifies the variational approach to taxation and optimal taxation. We present several other characteristics of the gradient flow focusing on its smoothing properties.