Linearization Methods in Macroeconomics#
Introduction#
Macroeconomic models are almost universally nonlinear. Production functions, utility functions, budget constraints, and equilibrium conditions all involve products, ratios, and exponentials of endogenous variables. Solving these models exactly is generally impossible — closed-form solutions exist only in special cases — so economists rely on approximation methods that replace the original nonlinear system with a tractable linear one in the neighborhood of a particular equilibrium.
This notebook develops two related linearization techniques that are workhorses of modern macroeconomics:
Taylor approximation: the general mathematical tool for approximating a smooth function by a linear (or higher-order polynomial) function near a point of interest.
Log-linearization and Uhlig’s method: a specialized application of Taylor approximation that expresses model variables as log-deviations from their steady-state values, producing an approximation that is particularly convenient for multiplicative nonlinearities.
Throughout we emphasize both the mechanics — the step-by-step procedure for applying each method — and the economic interpretation: what does the linear approximation tell us about the behavior of the model near its steady state, and when is it a reliable guide to the model’s true dynamics?
Taylor Approximation#
Functions of One Variable#
The Taylor approximation replaces a smooth function \(F: \mathbb{R} \to \mathbb{R}\) with a polynomial that behaves similarly to \(F\) within a neighborhood of a point \(x^*\). The first-order (linear) Taylor approximation around \(x^*\) is:
where \(\Delta x = x - x^*\) is the perturbation around the approximation point. Geometrically, this replaces the curve \(F(x)\) with its tangent line at \(x^*\). The approximation is exact at \(x = x^*\) and becomes less accurate as \(|\Delta x|\) grows — the approximation error is of order \(O((\Delta x)^2)\).
The quality of the approximation depends on two things: the size of the perturbation \(|\Delta x|\) and the curvature of \(F\) at \(x^*\) (captured by \(F''(x^*)\)). A highly curved function is poorly approximated by its tangent line even for small perturbations; a nearly linear function is well approximated even for large perturbations.
Functions of Multiple Variables#
For \(F: \mathbb{R}^2 \to \mathbb{R}\), the first-order Taylor approximation around \((x^*, y^*)\) is:
The change in the function value is represented by the linear map:
Geometrically this replaces the surface \(F(x, y)\) with its tangent plane at \((x^*, y^*)\).
Vector-Valued Functions: The Jacobian#
For a vector-valued function \(F = (f_1, f_2, \ldots, f_m): \mathbb{R}^n \to \mathbb{R}^m\), the first-order Taylor approximation around \(x^*\) is:
where \(J_F(x^*)\) is the Jacobian matrix of \(F\) evaluated at \(x^*\):
The Jacobian is the multi-dimensional generalization of the derivative: it captures the first-order sensitivity of every output to every input. In macroeconomic applications, \(F\) is typically a system of equilibrium conditions, \(x^*\) is the steady state, and \(J_F(x^*)\) governs the local dynamics of the model around that steady state. The eigenvalues of the Jacobian determine whether the steady state is stable, unstable, or a saddle point — as we saw in the dynamics notebook.
Numerical Illustration#
As an example, consider approximating the exponential function \(F(x)=e^x\) and it’s inverse \(G(x)=\ln x\) about the point \(x^*=1\). We have the first-order Taylor approximations $\( \begin{align} F(x^*+\Delta x) &\approx e^{x^*}+e^{x^*}(x-x^*) = e \cdot x \\ G(x^*+\Delta x) &\approx \ln(x^*)+1/x^*(x-x^*) = x-1 \end{align} \)$
and second-order approximations $\( \begin{align} F(x^*+\Delta x) &\approx e^{x^*}+e^{x^*}(x-x^*)+\frac{e^{x^*}}{2}(x-x^*)^2 = e \left( 1 + (x-1) + \frac{(x-1)^2}{2} \right) \\ G(x^*+\Delta x) &\approx \ln(x^*)+1/x^*(x-x^*)-\frac{1}{2{x^*}^2}(x-x^*)^2 = (x-1) - \frac{1}{2}(x-1)^2 \end{align} \)$
The left two panels plot these first- and second-order Taylor approximations for \(e^x\) and \(\ln x\) around \(x^* = 1\). The first-order approximation (tangent line) is exact at \(x^*\) and diverges from the true function as \(|x - x^*|\) grows. The second-order approximation tracks the function more closely by capturing its curvature. The right panel quantifies the approximation error as a function of perturbation size on a log scale. Hence, first-order approximations are useful for studying small fluctuations around the steady state — which is exactly the business cycle application.
Log-Linearization#
Motivation#
First-order Taylor approximations applied to a nonlinear model produces a linear approximation in the levels of variables. In macroeconomics, a more natural approximation works in log-deviations from steady state. There are three reasons for this preference:
Multiplicative nonlinearities become additive. Many macroeconomic relationships involve products and ratios — \(Y = AK^\alpha L^{1-\alpha}\), \(pq = wl + rk\), and so on. Taking logs converts multiplication to addition and division to subtraction, dramatically simplifying the algebra.
Log-deviations are interpretable as percentage changes. If \(\tilde{x} \equiv \ln x - \ln x^*\), then \(\tilde{x} \approx (x - x^*)/x^*\) for small deviations — the log-deviation is approximately the percentage deviation from steady state. This makes the linearized model’s predictions directly comparable to empirical moments expressed as percentage deviations.
Coefficients have elasticity interpretations. In a log-linearized equation, the coefficient on \(\tilde{x}\) in the expression for \(\tilde{y}\) is the elasticity of \(y\) with respect to \(x\) — the percentage change in \(y\) per one percent change in \(x\). These are among the most economically meaningful objects in applied work.
The Log-Linearization Procedure#
Consider a nonlinear model given by \(F(x) = G(x)/H(x)\). The log-linearization proceeds in two steps.
Step 1. Take the logarithm of both sides:
Step 2. Take a first-order Taylor approximation of each term around \(x^*\):
Since the original equation must hold at the steady state, \(\ln F(x^*) = \ln G(x^*) - \ln H(x^*)\) cancels, leaving:
This is the log-linear approximation: a linear equation in the percentage deviations of \(x\) from its steady-state value.
Uhlig’s Method#
The Algorithm#
Harald Uhlig developed a particularly efficient algorithm for log-linearizing macroeconomic models that exploits the structure of the approximation to minimize the algebra involved. The algorithm has three steps:
Step 1. Define log-deviations \(\tilde{x} \equiv \ln x - \ln x^*\), and rewrite every variable in the model as \(x = x^* e^{\tilde{x}}\). Substitute throughout.
Step 2. Algebraically combine as many exponential terms as possible, collecting them into a single expression \(e^{(\text{linear combination of } \tilde{x}_i)}\).
Step 3. Apply the first-order Taylor approximation \(e^u \approx 1 + u\) for small \(u\), where \(u\) is the linear combination from Step 2. Since \(\tilde{x} = 0\) at the steady state by construction, higher-order terms in \(\tilde{x}\) are discarded.
Uhlig’s Rules#
The procedure in Steps 1–3 can be summarized as a set of simple algebraic rules that can be applied mechanically:
Uhlig’s Rules
For log-deviations \(\tilde{x} \approx (x - x^*)/x^*\) small:
Exponential approximation: \(e^{\tilde{x} + \alpha\tilde{y}} \approx 1 + \tilde{x} + \alpha\tilde{y}\)
Product approximation: \(\tilde{x}\tilde{y} \approx 0\) (products of small deviations are second-order and discarded)
Expectations: \(\mathbb{E}[\alpha e^{\tilde{x}}] \approx \alpha + \alpha\,\mathbb{E}[\tilde{x}]\)
Rule 1 is the key workhorse: it converts the nonlinear exponential into a linear expression. Rule 2 ensures consistency — any term involving a product of two log-deviations is second-order small and dropped. Rule 3 extends the approximation to stochastic models with rational expectations.
Worked Examples#
Consider the model:
We want to express \(F\) as a linear function of the log-deviations \((\tilde{x}, \tilde{y}, \tilde{z})\).
Step 1. Substitute \(x = x^*e^{\tilde{x}}\), \(y = y^*e^{\tilde{y}}\), \(z = z^*e^{\tilde{z}}\):
Step 2. Collect steady-state values and combine exponentials:
Step 3. Apply Rule 1: \(e^{\tilde{x}+\alpha\tilde{y}-\beta\tilde{z}} \approx 1 + \tilde{x} + \alpha\tilde{y} - \beta\tilde{z}\), so:
Equivalently, in terms of the log-deviation of \(F\) from its steady state:
The coefficients are exactly the elasticities: a 1% increase in \(x\) raises \(F\) by 1%; a 1% increase in \(y\) raises \(F\) by \(\alpha\%\); a 1% increase in \(z\) reduces \(F\) by \(\beta\%\). This is the sense in which log-linearization produces elasticity interpretations automatically.
CES Production Function#
Consider a Constant Elasticity of Substitution (CES) production function:
To find the log-linear approximation using Uhlig’s Method, we follow the standard three-step algorithm.
Step 1: Substitution Replace levels with log-deviations using the identity \(x = x^* e^{\tilde{x}}\):
Step 2: Expansion and Steady-State Alignment Distribute the power \(\rho\) and factor out the steady-state constants:
Step 3: Apply Uhlig’s Rules Apply the first-order approximation \(e^u \approx 1 + u\) to the internal exponential terms:
Since \((F^*)^\rho = \alpha (k^*)^\rho + (1-\alpha) (l^*)^\rho\) at the steady state, we simplify:
Factoring out \((F^*)^\rho\):
Define the steady-state cost shares as \(s_k = \frac{\alpha (k^*)^\rho}{(F^*)^\rho}\) and \(s_l = \frac{(1-\alpha) (l^*)^\rho}{(F^*)^\rho}\). Applying the binomial approximation \((1+x)^n \approx 1 + nx\):
Cobb-Douglas Production Function:#
The Cobb-Douglas function \(F = k^\alpha l^{1-\alpha}\) is the analytical limit of the CES function as \(\rho \to 0\).Mathematically, the Cobb-Douglas form allows us to move all variables into a single exponential term before we ever apply an approximation:
Because \(e^{\tilde{F}} = e^{\alpha\tilde{k} + (1-\alpha)\tilde{l}}\) is an identity, taking the natural log of both sides yields:
In this specific case, the “approximation” is exact in log-space.
It is crucial to distinguish between the two types of errors inherent in this process. When we convert a curve into a line (tangent), we lose the “bow” of the function. Even in Cobb-Douglas, \(F \approx F^*(1 + \tilde{F})\) is an approximation in levels. We are replacing the true surface with a flat tangent plane. In the CES case, the relationship between the logs of the variables is itself non-linear. Therefore, even in “percent space,” we are making an approximation.
The top-left panel compares the exact Cobb-Douglas function with its log-linearized approximation in levels as \(x\) varies from 0.5 to 2. The two are nearly identical near the steady state \(x^* = 1\) and diverge as the perturbation grows. The top-right panel compares the exact and approximate function in log-deviations. Recall that since Cobb-Douglas is linear in logs, the approximation is exact in log-space.
The bottom panels compares the exact and approximate CES production function. Since log-linearization is a local approximation of a function’s elasticity, the accuracy of Uhlig’s Method depends on how constant those elasticities remain as we move away from the steady state. In the Cobb-Douglas case, elasticities are constant by definition, so the ‘approximation’ is globally exact. In the CES case, elasticities shift as the input mix changes. The parameter \(\rho\) controls this shift; the further \(\rho\) is from zero, the more the ‘true’ elasticity deviates from the steady-state share \(s_k\), and the more visible our approximation error becomes.”
Consumption Euler Equation#
As a more substantive economic application, consider the Euler equation from the Real Business Cycle model:
where \(u(C) = C^{1-\sigma}/(1-\sigma)\) is the CRRA utility function with \(u'(C) = C^{-\sigma}\). Substituting:
Step 1. Substitute \(C_t = C^* e^{\tilde{C}_t}\) and \(r_{t+1} = r^* + \tilde{r}_{t+1}\cdot r^*\) (noting that \(r\) enters additively, so we approximate \(1 + r_{t+1} \approx (1+r^*)(1 + \frac{r^*}{1+r^*}\tilde{r}_{t+1})\)):
Step 2. At the steady state \(\beta(1+r^*) = 1\), so the steady-state terms cancel. Applying Uhlig’s Rules:
Step 3. Rearranging:
This is the log-linearized Euler equation: consumption today equals expected future consumption minus \(1/\sigma\) times the expected return. The coefficient \(1/\sigma\) is the intertemporal elasticity of substitution — exactly the elasticity interpretation that Uhlig’s method delivers automatically.
The plots below consider how an interest rate shock affects the optimal consumption path. We plot the impulse responses for both the exact and approximate Euler equation.
To compute an exact path, we make two simplifying assumptions:
Perfect Foresight: We assume the agent knows the path of interest rates \(\{r_t\}_{t=0}^T\).
Terminal Steady State: We assume that by period \(T\) (the “horizon”), the economy has returned to its steady state (\(C_T = C^*\)).
We rewrite the Euler equation to isolate \(C_t\):
We then solve backward from \(T-1\) to \(0\). At \(T\), \(C_T = 1.0\) (Steady State). At \(T-1\): \(C_{T-1} = C_T \cdot [\beta(1+r_T)]^{-1/\sigma}\). At \(T-2\): \(C_{T-2} = C_{T-1} \cdot [\beta(1+r_{T-1})]^{-1/\sigma}\). This produces the non-linear path. The “error” in the log-linear model arises because the operation \(\ln(\mathbb{E}[\cdot])\) is replaced with \(\mathbb{E}[\ln(\cdot)]\), and the convex curvature of the power function is replaced by a flat line.
In the exact Euler equation:
In the log-linearized version:
The term \(\frac{1}{\sigma} \frac{r^*}{1+r^*}\) is the effective elasticity of consumption with respect to the interest rate deviation. When we use Uhlig’s rule, we approximate \((1+r_{t+1})\) as \((1+r^*)(1 + \frac{r^*}{1+r^*}\tilde{r}_{t+1})\). However, the function \(f(R) = R^{-1/\sigma}\) is convex. By Jensen’s Inequality and the properties of linear tangents to convex curves, the linear approximation of a convex function will always lie below the actual curve. If \(C_t\) is a convex function of the interest rate, a linear approximation (the red dashed line) will predict a lower level of consumption (a larger drop) than the exact curved relationship for a given increase in \(r\). This explains why the log-linear IRF shows a more “aggressive” drop: the linear tangent “overshoots” the curve as the interest rate rises.
One might expect the log-linear model to be conservative, but for the RBC Euler equation, the opposite is true. Because the marginal utility of consumption is highly convex, the linear approximation of the Euler equation ‘overshoots’ the drop in consumption following an interest rate hike. This illustrates a critical lesson: log-linearized models tend to exaggerate the impact of shocks when the underlying economic relationships have significant curvature.”
Accuracy and Limitations#
Log-linearization is the standard solution method in macroeconomics, but it rests on an approximation that can fail in important cases. Several limitations deserve emphasis.
Local validity. The approximation is accurate only in a neighborhood of the steady state. For models with large shocks — financial crises, pandemic disruptions, regime changes — the economy may move far from steady state and the linear approximation may be unreliable. As we saw in the dynamics notebook, the search and matching model is a case where nonlinearities are quantitatively important even at business cycle frequencies.
Asymmetric dynamics. Log-linearization produces a symmetric approximation: positive and negative shocks of equal magnitude produce responses of equal magnitude but opposite sign. Models with asymmetric nonlinearities — such as the concave matching function in the search and matching model — generate asymmetric responses that the linear approximation cannot capture. Recessions may be sharper than expansions even under symmetric shocks, a feature visible only in the nonlinear solution.
Multiple equilibria. If the nonlinear model has multiple steady states, the log-linearization is valid only locally around the particular steady state at which it is taken. It cannot characterize transitions between equilibria or global dynamics.
Zero lower bound and occasionally binding constraints. When constraints occasionally bind — the zero lower bound on interest rates, occasionally binding borrowing constraints — the linear approximation misses the kink in the equilibrium conditions at the constraint boundary. These cases require global solution methods.
Despite these limitations, log-linearization remains the dominant solution method in macroeconomics for good reason: it delivers transparent, analytically tractable solutions whose coefficients have clean economic interpretations as elasticities, and it is accurate for the small fluctuations that characterize normal business cycles. Understanding when it is appropriate — and when it is not — is an essential skill for modern macroeconomic analysis.
Conclusion#
This notebook has developed two related linearization techniques. Taylor approximation replaces a smooth nonlinear function with its tangent hyperplane at a point of interest, producing a linear map from perturbations to changes in function values. The Jacobian matrix is the multi-dimensional generalization of this idea and governs the local dynamics of macroeconomic systems around their steady states.
Log-linearization applies Taylor approximation to the logarithm of the model’s equations, expressing the result in terms of percentage log-deviations from steady state. This is particularly natural for multiplicative nonlinearities and produces coefficients with elasticity interpretations. Uhlig’s method provides an efficient algorithm for implementing log-linearization: substitute \(x = x^*e^{\tilde{x}}\), combine exponential terms, and apply the rule \(e^u \approx 1 + u\).
The worked examples — the Cobb-Douglas production function and the RBC Euler equation — illustrate that log-linearization delivers clean, interpretable results with minimal algebra. The numerical illustrations confirm that the approximation is accurate for typical business cycle fluctuations but can fail for large shocks, motivating the global solution methods discussed in the dynamics notebook.