Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.


A.1 Differentiation Rules

Basic rules. For differentiable functions f,gf, g and constant cc:

RuleFormula
Constant(c)′=0(c)' = 0
Power(xn)′=nxn−1(x^n)' = nx^{n-1}
Sum(f+g)′=f′+g′(f+g)' = f' + g'
Product(fg)′=f′g+fg′(fg)' = f'g + fg'
Quotient(f/g)′=(f′g−fg′)/g2(f/g)' = (f'g - fg')/g^2
Chain(f(g(x)))′=f′(g(x))⋅g′(x)(f(g(x)))' = f'(g(x))\cdot g'(x)
InverseIf y=f−1(x)y = f^{-1}(x): dy/dx=1/f′(y)dy/dx = 1/f'(y)

Common functions:

FunctionDerivative
exe^xexe^x
axa^xaxln⁡aa^x\ln a
ln⁡x\ln x1/x1/x
log⁡ax\log_a x1/(xln⁡a)1/(x\ln a)
sin⁡x\sin xcos⁡x\cos x
cos⁡x\cos x−sin⁡x-\sin x
arctan⁡x\arctan x1/(1+x2)1/(1+x^2)

Implicit differentiation. If F(x,y)=0F(x, y) = 0 defines yy as a function of xx: dy/dx=−Fx/Fydy/dx = -F_x/F_y.

Logarithmic differentiation. For y=f(x)g(x)y = f(x)^{g(x)}: ln⁡y=g(x)ln⁡f(x)\ln y = g(x)\ln f(x), then differentiate both sides.

A.2 Integration Formulas

IntegrandAntiderivative
xnx^n (n≠−1n\neq-1)xn+1/(n+1)x^{n+1}/(n+1)
1/x1/x$\ln
eaxe^{ax}eax/ae^{ax}/a
ln⁡x\ln xxln⁡x−xx\ln x - x
sin⁡ax\sin ax−cos⁡(ax)/a-\cos(ax)/a
cos⁡ax\cos axsin⁡(ax)/a\sin(ax)/a
1/(1+x2)1/(1+x^2)arctan⁡x\arctan x

Integration by parts: ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du.

Gaussian integral: ∫−∞∞e−ax2dx=π/a\int_{-\infty}^\infty e^{-ax^2}dx = \sqrt{\pi/a} for a>0a > 0.

Present value integral: ∫0∞e−ρtf(t)dt=L{f}(ρ)\int_0^\infty e^{-\rho t}f(t)dt = \mathcal{L}\{f\}(\rho) (Laplace transform at ρ\rho).

A.3 Taylor Series Expansions

f(x)=∑n=0∞f(n)(a)n!(x−a)n(Taylor series around a)f(x) = \sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n \quad \text{(Taylor series around }a\text{)}

Standard expansions around 0:

FunctionExpansion
exe^x1+x+x2/2!+x3/3!+⋯1 + x + x^2/2! + x^3/3! + \cdots
ln⁡(1+x)\ln(1+x)x−x2/2+x3/3−⋯x - x^2/2 + x^3/3 - \cdots ($
(1+x)α(1+x)^\alpha1+αx+α(α−1)2x2+⋯1 + \alpha x + \frac{\alpha(\alpha-1)}{2}x^2 + \cdots
1/(1−x)1/(1-x)1+x+x2+x3+⋯1 + x + x^2 + x^3 + \cdots ($
sin⁡x\sin xx−x3/6+x5/120−⋯x - x^3/6 + x^5/120 - \cdots
cos⁡x\cos x1−x2/2+x4/24−⋯1 - x^2/2 + x^4/24 - \cdots

Key approximations (small xx): ln⁡(1+x)≈x\ln(1+x) \approx x, (1+x)α≈1+αx(1+x)^\alpha \approx 1 + \alpha x, ex≈1+x+x2/2e^x \approx 1 + x + x^2/2.

A.4 Matrix Identities

Woodbury identity: (A+UCV)−1=A−1−A−1U(C−1+VA−1U)−1VA−1(A + UCV)^{-1} = A^{-1} - A^{-1}U(C^{-1}+VA^{-1}U)^{-1}VA^{-1}.

Sherman–Morrison: (A+uv′)−1=A−1−A−1uv′A−11+v′A−1u(A + \mathbf{u}\mathbf{v}')^{-1} = A^{-1} - \frac{A^{-1}\mathbf{u}\mathbf{v}'A^{-1}}{1+\mathbf{v}'A^{-1}\mathbf{u}}.

Matrix determinant lemma: det⁡(A+uv′)=(1+v′A−1u)det⁡(A)\det(A + \mathbf{u}\mathbf{v}') = (1+\mathbf{v}'A^{-1}\mathbf{u})\det(A).

Trace and determinant: tr(AB)=tr(BA)\text{tr}(AB) = \text{tr}(BA). det⁡(AB)=det⁡(A)det⁡(B)\det(AB) = \det(A)\det(B). det⁡(A−1)=1/det⁡(A)\det(A^{-1}) = 1/\det(A).

Kronecker product: (A⊗B)(C⊗D)=(AC)⊗(BD)(A\otimes B)(C\otimes D) = (AC)\otimes(BD). vec(AXB)=(B′⊗A)vec(X)\text{vec}(AXB) = (B'\otimes A)\text{vec}(X).

Differentiation: ∂(Ax)/∂x=A\partial(A\mathbf{x})/\partial\mathbf{x} = A. ∂(x′Ax)/∂x=(A+A′)x\partial(\mathbf{x}'A\mathbf{x})/\partial\mathbf{x} = (A+A')\mathbf{x}. ∂ln⁡det⁡(A)/∂A=(A−1)′\partial\ln\det(A)/\partial A = (A^{-1})'.

A.5 Special Functions in Macroeconomics

Log-normal: If ln⁡X∼N(μ,σ2)\ln X \sim \mathcal{N}(\mu,\sigma^2), then X∼LogNormal(μ,σ2)X \sim \text{LogNormal}(\mu,\sigma^2) with E[X]=eμ+σ2/2\mathbb{E}[X] = e^{\mu+\sigma^2/2}, Var[X]=(eσ2−1)e2μ+σ2\text{Var}[X] = (e^{\sigma^2}-1)e^{2\mu+\sigma^2}.

Gamma function: Γ(n)=(n−1)!\Gamma(n) = (n-1)! for integer nn; Γ(1/2)=π\Gamma(1/2) = \sqrt{\pi}; Γ(n+1)=nΓ(n)\Gamma(n+1) = n\Gamma(n).

Normal CDF: Φ(z)=P(Z≤z)\Phi(z) = P(Z\leq z) for Z∼N(0,1)Z\sim\mathcal{N}(0,1); Φ(−z)=1−Φ(z)\Phi(-z) = 1-\Phi(z).


Appendix B: Linear Algebra Review


B.1 Vector Spaces

Definition. A vector space over R\mathbb{R} is a set VV with addition and scalar multiplication satisfying 8 axioms (closure, associativity, commutativity, identity, inverses, distributivity).

Basis and dimension. A set {v1,…,vn}\{\mathbf{v}_1,\ldots,\mathbf{v}_n\} is a basis if it is linearly independent and spans VV. The dimension dim⁡V\dim V is the cardinality of any basis.

Standard basis of Rn\mathbb{R}^n: ei\mathbf{e}_i has 1 in position ii and 0 elsewhere.

B.2 Matrix Operations

Rank. rank(A)\text{rank}(A) = number of linearly independent rows (= columns). rank(A)≤min⁡(m,n)\text{rank}(A) \leq \min(m,n) for A∈Rm×nA\in\mathbb{R}^{m\times n}. Full column rank: rank(A)=n\text{rank}(A) = n (columns independent). Full row rank: rank(A)=m\text{rank}(A) = m.

Null space. N(A)={x:Ax=0}\mathcal{N}(A) = \{\mathbf{x}: A\mathbf{x}=\mathbf{0}\}. Dimension: n−rank(A)n - \text{rank}(A) (rank-nullity theorem).

Norms. ∥x∥1=∑∣xi∣\|\mathbf{x}\|_1 = \sum|x_i|; ∥x∥2=∑xi2\|\mathbf{x}\|_2 = \sqrt{\sum x_i^2}; ∥x∥∞=max⁡∣xi∣\|\mathbf{x}\|_\infty = \max|x_i|. Matrix norm: ∥A∥2=σmax⁡(A)\|A\|_2 = \sigma_{\max}(A) (largest singular value); ∥A∥F=tr(A′A)\|A\|_F = \sqrt{\text{tr}(A'A)} (Frobenius).

B.3 Determinants and Cramer’s Rule

For A∈R2×2A\in\mathbb{R}^{2\times2}: det⁡(A)=a11a22−a12a21\det(A) = a_{11}a_{22} - a_{12}a_{21}.

Cramer’s rule. For Ax=bA\mathbf{x} = \mathbf{b} with det⁡(A)≠0\det(A)\neq0: xi=det⁡(Ai)/det⁡(A)x_i = \det(A_i)/\det(A), where AiA_i is AA with column ii replaced by b\mathbf{b}.

Properties. det⁡(AB)=det⁡(A)det⁡(B)\det(AB) = \det(A)\det(B). det⁡(A′)=det⁡(A)\det(A') = \det(A). det⁡(αA)=αndet⁡(A)\det(\alpha A) = \alpha^n\det(A) (for n×nn\times n). det⁡(A)=∏iλi\det(A) = \prod_i\lambda_i (product of eigenvalues).

B.4 Eigenvalues and Eigenvectors

Av=λvA\mathbf{v} = \lambda\mathbf{v}, v≠0\mathbf{v}\neq\mathbf{0}. Eigenvalues are roots of det⁡(A−λI)=0\det(A-\lambda I) = 0 (characteristic polynomial).

Spectral decomposition (symmetric A=A′A=A'): A=QΛQ′A = Q\Lambda Q' where QQ is orthonormal and Λ=diag(λ1,…,λn)\Lambda = \text{diag}(\lambda_1,\ldots,\lambda_n).

Stability: Discrete: At→0A^t \to 0 iff ∣λi∣<1|\lambda_i| < 1 for all ii. Continuous: eAt→0e^{At} \to 0 iff Re(λi)<0\text{Re}(\lambda_i) < 0 for all ii.

Generalized eigenvalues. Av=λBvA\mathbf{v} = \lambda B\mathbf{v} has generalized eigenvalues λi=Tii/Sii\lambda_i = T_{ii}/S_{ii} from the QZ decomposition QAZ=SQAZ = S, QBZ=TQBZ = T.

B.5 The Perron–Frobenius Theorem

Theorem (Perron–Frobenius). Let AA be a square matrix with all positive entries. Then:

  1. AA has a unique largest real eigenvalue λ1>0\lambda_1 > 0 (the Perron root).

  2. The corresponding eigenvector v1\mathbf{v}_1 has all positive entries (Perron vector).

  3. ∣λi∣<λ1|\lambda_i| < \lambda_1 for all other eigenvalues.

Application in input-output analysis (Chapter 2). For the Leontief technical coefficient matrix AA (with Aij≥0A_{ij} \geq 0), the Perron root λ1(A)<1\lambda_1(A) < 1 guarantees (I−A)−1(I-A)^{-1} exists and is non-negative — the Leontief inverse has all non-negative entries (backward linkage multipliers are non-negative).

Application in Markov chains. For a stochastic matrix PP (row sums = 1, all entries ≥0\geq 0), Perron–Frobenius guarantees a unique stationary distribution π\bm\pi with π′P=π′\bm\pi'P = \bm\pi' and πi>0\pi_i > 0 for all ii (ergodic chains).

B.6 QR and LU Decompositions

LU decomposition. PA=LUPA = LU: PP permutation, LL unit lower triangular, UU upper triangular. Solves Ax=bA\mathbf{x}=\mathbf{b} in O(n3/3)O(n^3/3) flops (Chapter 25).

QR decomposition. A=QRA = QR: QQ orthonormal (Q′Q=IQ'Q=I), RR upper triangular. Used for numerically stable OLS (Chapter 25). κ(R)=κ(A)\kappa(R) = \kappa(A) vs. κ(A′A)=κ(A)2\kappa(A'A) = \kappa(A)^2 for normal equations.

Cholesky. For positive definite AA: A=LL′A = LL' (LL lower triangular). Fastest symmetric system solver. Used for sampling from multivariate normal (Chapter 26).

SVD. A=UΣV′A = U\Sigma V': U,VU, V orthonormal, Σ=diag(σ1,…,σr,0,…)\Sigma = \text{diag}(\sigma_1,\ldots,\sigma_r,0,\ldots). Rank = number of positive singular values. Used for numerical rank determination (Chapter 41).


Appendix C: Calculus Review


C.1 Limits and Continuity

Limit. lim⁡x→af(x)=L\lim_{x\to a}f(x) = L: for every ε>0\varepsilon>0 there exists δ>0\delta>0 such that ∣x−a∣<δ⇒∣f(x)−L∣<ε|x-a|<\delta \Rightarrow |f(x)-L|<\varepsilon.

L’Hôpital’s rule. If lim⁡f=lim⁡g=0\lim f = \lim g = 0 (or ±∞\pm\infty): lim⁡f/g=lim⁡f′/g′\lim f/g = \lim f'/g' (when the right-hand limit exists).

Useful limits: lim⁡x→0(1+x)1/x=e\lim_{x\to0}(1+x)^{1/x} = e. lim⁡n→∞(1+r/n)n=er\lim_{n\to\infty}(1+r/n)^n = e^r. lim⁡x→0sin⁡xx=1\lim_{x\to0}\frac{\sin x}{x} = 1.

C.2 Multivariate Differentiation

Partial derivative. ∂f/∂xi\partial f/\partial x_i = derivative of ff treating all xjx_j (j≠ij\neq i) as constants.

Gradient. ∇f=(∂f/∂x1,…,∂f/∂xn)′∈Rn\nabla f = (\partial f/\partial x_1, \ldots, \partial f/\partial x_n)' \in \mathbb{R}^n.

Hessian. Hf=[∂2f/∂xi∂xj]H_f = [\partial^2f/\partial x_i\partial x_j] — symmetric n×nn\times n matrix of second partial derivatives. Hf≻0H_f \succ 0 (positive definite) iff ff is strictly convex.

Jacobian. For F:Rn→RmF:\mathbb{R}^n\to\mathbb{R}^m: JF=[∂Fi/∂xj]J_F = [\partial F_i/\partial x_j] — the m×nm\times n matrix of first partial derivatives.

Chain rule (vector form). For h=f∘gh = f\circ g (h:Rm→Rph:\mathbb{R}^m\to\mathbb{R}^p, g:Rn→Rmg:\mathbb{R}^n\to\mathbb{R}^m, f:Rm→Rpf:\mathbb{R}^m\to\mathbb{R}^p): Jh=Jf(g(x))⋅Jg(x)J_h = J_f(g(\mathbf{x}))\cdot J_g(\mathbf{x}).

C.3 Optimization Conditions

Unconstrained. FOC: ∇f(x∗)=0\nabla f(\mathbf{x}^*) = \mathbf{0}. SOC (minimum): Hf(x∗)≻0H_f(\mathbf{x}^*) \succ 0.

Equality constraints (Lagrange). Maximize f(x)f(\mathbf{x}) s.t. g(x)=0g(\mathbf{x}) = 0: Lagrangian L=f−λg\mathcal{L} = f - \lambda g; FOCs: ∇f=λ∇g\nabla f = \lambda\nabla g.

Inequality constraints (KKT). Maximize ff s.t. gj(x)≤0g_j(\mathbf{x}) \leq 0: KKT conditions: ∇f=∑jμj∇gj\nabla f = \sum_j\mu_j\nabla g_j; μj≥0\mu_j \geq 0; μjgj=0\mu_jg_j = 0 (complementary slackness).

Envelope theorem. For V(α)=max⁡xf(x,α)V(\alpha) = \max_x f(x,\alpha) s.t. g(x,α)=0g(x,\alpha)=0: dV/dα=∂L/∂α∣x=x∗(α)dV/d\alpha = \partial\mathcal{L}/\partial\alpha|_{x=x^*(\alpha)}.

C.4 Integration

Fundamental theorem of calculus. ddx∫axf(t)dt=f(x)\frac{d}{dx}\int_a^x f(t)dt = f(x). ∫abf′(x)dx=f(b)−f(a)\int_a^b f'(x)dx = f(b) - f(a).

Fubini’s theorem. For integrable ff: ∫ ⁣∫f(x,y)dxdy=∫ ⁣[∫f(x,y)dx]dy\int\!\int f(x,y)dxdy = \int\!\left[\int f(x,y)dx\right]dy.

Change of variables. ∫ϕ(a)ϕ(b)f(x)dx=∫abf(ϕ(t))ϕ′(t)dt\int_{\phi(a)}^{\phi(b)}f(x)dx = \int_a^b f(\phi(t))\phi'(t)dt.

Leibniz rule. ddα∫a(α)b(α)f(x,α)dx=f(b,α)b′(α)−f(a,α)a′(α)+∫ab∂f∂αdx\frac{d}{d\alpha}\int_{a(\alpha)}^{b(\alpha)}f(x,\alpha)dx = f(b,\alpha)b'(\alpha) - f(a,\alpha)a'(\alpha) + \int_a^b\frac{\partial f}{\partial\alpha}dx.

Dominated convergence theorem. If fn→ff_n \to f pointwise and ∣fn∣≤g|f_n| \leq g (integrable), then ∫fn→∫f\int f_n \to \int f.


Appendix D: Probability Distributions and Statistical Tables


D.1 Core Distributions

Normal Distribution: N(μ,σ2)\mathcal{N}(\mu, \sigma^2)

PDF: f(x)=1σ2πexp⁡ ⁣[−(x−μ)22σ2]f(x) = \frac{1}{\sigma\sqrt{2\pi}}\exp\!\left[-\frac{(x-\mu)^2}{2\sigma^2}\right].

Mean: μ\mu. Variance: σ2\sigma^2. MGF: M(t)=eμt+σ2t2/2M(t) = e^{\mu t + \sigma^2t^2/2}.

Standard normal N(0,1)\mathcal{N}(0,1): CDF Φ(z)\Phi(z). Key quantiles: Φ−1(0.025)=−1.960\Phi^{-1}(0.025) = -1.960, Φ−1(0.05)=−1.645\Phi^{-1}(0.05) = -1.645, Φ−1(0.10)=−1.282\Phi^{-1}(0.10) = -1.282.

Log-Normal Distribution: LogN(μ,σ2)\text{LogN}(\mu, \sigma^2)

X∼LogN(μ,σ2)X \sim \text{LogN}(\mu,\sigma^2) iff ln⁡X∼N(μ,σ2)\ln X \sim \mathcal{N}(\mu,\sigma^2).

Mean: eμ+σ2/2e^{\mu+\sigma^2/2}. Variance: (eσ2−1)e2μ+σ2(e^{\sigma^2}-1)e^{2\mu+\sigma^2}. Median: eμe^\mu.

Role in macroeconomics: Income and productivity shocks (At=eztA_t = e^{z_t}, zt∼Nz_t \sim \mathcal{N}); asset prices; firm sizes (Chapter 33).

Gamma Distribution: Gamma(α,β)\text{Gamma}(\alpha, \beta)

PDF: f(x)=βαΓ(α)xα−1e−βxf(x) = \frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}, x>0x > 0.

Mean: α/β\alpha/\beta. Variance: α/β2\alpha/\beta^2.

Role: Prior for positive parameters (CRRA σ\sigma, shock persistence); the chi-squared is χ2(k)=Gamma(k/2,1/2)\chi^2(k) = \text{Gamma}(k/2, 1/2).

Beta Distribution: Beta(α,β)\text{Beta}(\alpha, \beta)

PDF: f(x)=xα−1(1−x)β−1B(α,β)f(x) = \frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha,\beta)}, x∈(0,1)x\in(0,1).

Mean: α/(α+β)\alpha/(\alpha+\beta). Variance: αβ/[(α+β)2(α+β+1)]\alpha\beta/[(\alpha+\beta)^2(\alpha+\beta+1)].

Role: Prior for parameters in [0,1][0,1] — Calvo probability θ\theta, AR persistence ρ\rho, capital share α\alpha.

Inverse-Gamma Distribution: IG(α,β)\text{IG}(\alpha, \beta)

X∼IG(α,β)X \sim \text{IG}(\alpha,\beta) iff 1/X∼Gamma(α,β)1/X \sim \text{Gamma}(\alpha,\beta).

Mean: β/(α−1)\beta/(\alpha-1) (α>1\alpha>1). Variance: β2/[(α−1)2(α−2)]\beta^2/[(\alpha-1)^2(\alpha-2)] (α>2\alpha>2).

Role: Prior for variance parameters (σε2\sigma^2_\varepsilon) — conjugate prior for the normal variance.

D.2 Key Statistical Tables

Normal Distribution Quantiles

ppΦ−1(p)\Phi^{-1}(p)
0.901.282
0.951.645
0.9751.960
0.992.326
0.9952.576

ADF Critical Values (asymptotic, constant + trend)

SignificanceNo trendWith trend
1%−3.43−3.96
5%−2.86−3.41
10%−2.57−3.12

Johansen Trace Statistic Critical Values (5%)

rr (null: rank ≤r\leq r)n=2n=2n=3n=3n=4n=4
015.529.747.2
13.815.429.7
2—3.815.4

D.3 Moment-Generating Functions

DistributionMGF M(t)=E[etX]M(t) = \mathbb{E}[e^{tX}]
N(μ,σ2)\mathcal{N}(\mu,\sigma^2)eμt+σ2t2/2e^{\mu t + \sigma^2t^2/2}
Bernoulli(p)\text{Bernoulli}(p)1−p+pet1-p+pe^t
Poisson(λ)\text{Poisson}(\lambda)eλ(et−1)e^{\lambda(e^t-1)}
Gamma(α,β)\text{Gamma}(\alpha,\beta)(1−t/β)−α(1-t/\beta)^{-\alpha} (t<βt<\beta)
Exponential(λ)\text{Exponential}(\lambda)λ/(λ−t)\lambda/(\lambda-t) (t<λt<\lambda)

Key property: E[Xk]=M(k)(0)\mathbb{E}[X^k] = M^{(k)}(0) (the kk-th derivative of MGF at 0).