Case Study: Economic Input-Output Analysis: How Linear Algebra Models Sector Interdependence

Last Updated July 6, 2026

Economic Input-Output Analysis shows how linear algebra models interdependence among sectors, industries, supply chains, and final demand. Economic systems are not collections of isolated industries. Agriculture uses energy, transportation, finance, manufacturing, and services. Manufacturing uses materials, labor, logistics, electricity, digital systems, and intermediate goods. Health, construction, technology, food, public services, and infrastructure all depend on upstream sectors whose disruptions can propagate through the economy.

This article continues Part X of the Linear Algebra for Systems Modeling series by applying matrix methods to economic input-output analysis: transaction tables, technical coefficients, interindustry dependence, Leontief systems, total requirements, final demand, output multipliers, shock propagation, supply-chain exposure, imports, aggregation, prices, capacity constraints, environmental extensions, data quality, uncertainty, and responsible interpretation.

The central modeling question is not only “How much does one sector buy from another?” It is “How do sector relationships shape total output requirements, indirect effects, systemic exposure, and the limits of what an input-output model can responsibly claim?”

Vintage economics workspace with sector dependency networks, input-output matrix grids, industrial flow diagrams, maps, charts, books, and analytical papers.
Economic input-output analysis shown through sectoral dependencies, production flows, matrix relationships, supply chains, and economy-wide structural effects.

Input-output analysis begins with a simple but powerful idea: one sector’s output is another sector’s input. A table of interindustry transactions can be transformed into a matrix of technical coefficients. That matrix can then be used to estimate how much total production is required to satisfy a given vector of final demand.

Linear algebra makes the method precise. A technical coefficient matrix records intermediate input requirements. A final-demand vector records household, government, export, investment, or other final uses. A gross-output vector records total sector production. The Leontief equation connects them. The Leontief inverse summarizes direct and indirect production requirements throughout the economy.

Why Economic Input-Output Analysis Matters

Economic input-output analysis matters because production is interdependent. A change in final demand for one sector can affect upstream suppliers, intermediate producers, transportation services, energy use, employment, emissions, imports, and public revenue. A disruption in one sector can reduce output elsewhere because other sectors depend on its intermediate goods or services.

Input-output analysis gives a structured way to examine these relationships. It does not explain all economic behavior. It does not replace price theory, macroeconomic modeling, supply-chain simulation, industrial organization, or policy judgment. But it provides a transparent matrix framework for asking how sector demand and interindustry requirements fit together.

Economic question Linear algebra object What it can clarify
Which sectors depend on which inputs? Technical coefficient matrix Direct input requirements per unit of sector output.
How much output is required to meet demand? Leontief system Total sector output needed for final demand.
What are direct and indirect requirements? Leontief inverse Production effects across supply chains.
Which sectors have high multipliers? Column sums of total requirements Relative upstream production dependence.
How do demand shocks propagate? Scenario demand vectors Output changes under alternative final-demand assumptions.
What should not be inferred? Interpretation boundary Limits involving prices, capacity, substitution, imports, and behavior.

The value of input-output modeling is clarity about structure. Its risk is treating fixed technical relationships as if they captured all economic adaptation.

Back to top ↑

Case Study Framing

This case study uses a small synthetic economy with three sectors: agriculture, manufacturing, and services. Each sector uses inputs from the others. Final demand represents purchases by households, government, exports, investment, or other non-intermediate users.

The case asks:

  • How are interindustry requirements encoded as a matrix?
  • How does final demand translate into total gross output?
  • Which sector has the largest total-requirements multiplier?
  • How does a demand shock change sector output?
  • What assumptions must be documented before results inform policy or planning?
Case element Modeling meaning Interpretive warning
Sector Aggregated industry category. Aggregation can hide firm, product, regional, and technology differences.
Technical coefficient Input requirement per unit of output. Assumes fixed production relationships over the modeled range.
Final demand Demand outside intermediate production. Demand may change with prices, income, policy, or substitution.
Gross output Total sector production required. Feasibility depends on capacity, labor, materials, and imports.
Multiplier Total production requirement associated with demand. High multiplier is not automatically high social value.
Shock scenario Changed demand vector or constrained sector. Scenario is not a forecast unless assumptions are validated.

The synthetic numbers are not the point. The workflow is the point: build the matrix, solve the system, inspect multipliers, test scenarios, document assumptions, and communicate limits.

Back to top ↑

Transactions, Sectors, and Final Demand

An input-output table begins with transactions among sectors. Rows often represent sectors that supply inputs. Columns often represent sectors that use inputs. Final demand is demand that does not become an intermediate input into another domestic production sector.

A simplified transaction table might ask how much agriculture sells to manufacturing, how much manufacturing sells to services, how much services support agriculture, and how much each sector sells to final users. The table is then transformed into technical coefficients by dividing each intermediate transaction by the total output of the purchasing sector.

Table element Meaning Modeling role
Intermediate transaction Output from one sector used by another sector. Builds the interindustry transaction matrix.
Final demand Demand from households, government, exports, investment, or other final users. Drives the output requirement calculation.
Gross output Total sector output. Used to compute technical coefficients.
Value added Labor compensation, taxes, surplus, and other non-intermediate value. Completes accounting identity but is often outside the basic Leontief equation.
Imports Inputs or final goods sourced outside the domestic system. Require domestic/import distinction for national or regional interpretation.
Margins and taxes Distribution, transport, wholesale, retail, and tax adjustments. Affect how transactions are valued and assigned.

The transaction table is an accounting object before it is a mathematical object. Responsible modeling preserves the accounting definitions behind the matrix.

Back to top ↑

Technical Coefficients

The technical coefficient matrix \(A\) records input requirements per unit of output. If sector \(j\) produces one unit of output, then \(a_{ij}\) records how much input from sector \(i\) is required under the model’s assumptions.

\[
a_{ij}=\frac{z_{ij}}{x_j}
\]

Interpretation: The technical coefficient \(a_{ij}\) is the intermediate input from sector \(i\) to sector \(j\), divided by total output of sector \(j\).

This coefficient is powerful because it normalizes transactions by output. It is also restrictive because it assumes fixed input proportions. If manufacturing output rises, the model assumes input requirements rise in fixed proportions unless the coefficient matrix changes.

Coefficient issue Model assumption Interpretive warning
Fixed proportions Inputs scale linearly with output. Substitution, technology change, and efficiency gains are omitted.
Average relationship Coefficient represents a sector-wide average. Firms and products within a sector may differ substantially.
Stable technology Production relationships remain stable. Coefficients may change during shocks, shortages, or innovation.
Sector aggregation Industries are grouped into broad categories. Aggregation can smooth bottlenecks and specialized dependencies.
Monetary valuation Transactions are measured in currency terms. Price changes can affect values without real quantity changes.
Domestic boundary Inputs are interpreted within a defined economy. Imports and global supply chains may shift interpretation.

Technical coefficients are not laws of nature. They are structured estimates of production relationships within a defined accounting and modeling context.

Back to top ↑

The Leontief System

The basic input-output model connects gross output, intermediate requirements, and final demand. If \(A\) is the technical coefficient matrix, \(\mathbf{x}\) is gross output, and \(\mathbf{d}\) is final demand, then intermediate production requirements are \(A\mathbf{x}\). Total output must satisfy intermediate requirements plus final demand.

\[
\mathbf{x}=A\mathbf{x}+\mathbf{d}
\]

Interpretation: Total output equals intermediate production requirements plus final demand.

Rearranging gives the linear system:

\[
(I-A)\mathbf{x}=\mathbf{d}
\]

Interpretation: The Leontief system solves for the gross output vector required to meet final demand.

This is where linear algebra becomes central. The economic model becomes a system of simultaneous linear equations. Each sector’s output depends on final demand and on outputs in other sectors.

Symbol Meaning Review question
\(A\) Technical coefficient matrix. How were coefficients estimated and validated?
\(I\) Identity matrix. Does the equation preserve sector-by-sector accounting?
\(I-A\) Leontief matrix. Is the system solvable and numerically stable?
\(\mathbf{x}\) Gross output vector. Does required output exceed capacity or plausible production?
\(\mathbf{d}\) Final demand vector. Is demand scenario realistic and clearly defined?
\(A\mathbf{x}\) Intermediate requirements. Are indirect production needs being interpreted correctly?

The Leontief system is mathematically elegant because it turns economic interdependence into a solvable linear system. It is economically limited because solvability does not guarantee realism.

Back to top ↑

The Leontief Inverse

When \(I-A\) is invertible, the gross-output solution can be written using the Leontief inverse:

\[
\mathbf{x}=(I-A)^{-1}\mathbf{d}
\]

Interpretation: The Leontief inverse maps final demand into total gross output requirements.

The Leontief inverse summarizes direct and indirect requirements. The direct requirement is the immediate input needed by the sector receiving final demand. Indirect requirements arise as supplier sectors increase output and require their own inputs from other sectors.

\[
(I-A)^{-1}=I+A+A^2+A^3+\cdots
\]

Interpretation: Under suitable conditions, the Leontief inverse can be understood as the sum of direct, indirect, and higher-order production requirements.

This series interpretation is useful because it reveals how economic effects travel through production chains. But it also depends on conditions that make the series converge and on assumptions that coefficients remain stable as output changes.

Term Economic interpretation Warning
\(I\) Final demand directly requiring sector output. Does not include upstream requirements.
\(A\) First-round intermediate input requirements. Assumes fixed input coefficients.
\(A^2\) Second-round supplier requirements. Higher-order effects depend on stable structure.
\(A^3+\cdots\) Further indirect production requirements. Economic interpretation becomes more abstract with each round.
\((I-A)^{-1}\) Total requirements matrix. May appear precise while reflecting uncertain coefficients.
\((I-A)^{-1}\mathbf{d}\) Gross output required for final demand. Feasibility depends on capacity, prices, imports, and time.

The Leontief inverse is a map from demand assumptions to production requirements, not a complete model of economic adjustment.

Back to top ↑

Multipliers and Total Requirements

Output multipliers are often computed from the Leontief inverse. A column sum can represent the total gross output required across all sectors to satisfy one unit of final demand in a given sector.

\[
m_j=\sum_i [(I-A)^{-1}]_{ij}
\]

Interpretation: The output multiplier for sector \(j\) is the column sum of the Leontief inverse under the chosen input-output convention.

Multipliers are useful because they summarize interdependence. They are risky because they can be misread as value, importance, productivity, policy priority, or welfare. A high multiplier means large modeled gross-output requirements, not automatically large net benefit.

Multiplier type Clarifies Can be misread as
Output multiplier Total gross production requirement per unit of final demand. Economic value or social benefit.
Employment multiplier Jobs associated with production requirements. Job quality, wage adequacy, or distributional benefit.
Income multiplier Labor income associated with production. Household welfare or equitable distribution.
Value-added multiplier Domestic value added associated with demand. Total impact without considering imports or displacement.
Emissions multiplier Environmental footprint associated with demand. Complete environmental impact without boundary review.
Regional multiplier Local production effects under regional coefficients. Guaranteed local growth or public benefit.

Multipliers are summaries of modeled requirements. Responsible interpretation keeps them tied to accounting definitions, coefficient assumptions, and policy context.

Back to top ↑

Shock Analysis and Demand Scenarios

Input-output models are often used for scenario analysis. A demand shock changes the final-demand vector. The model estimates the gross-output change implied by the Leontief system.

\[
\Delta \mathbf{x}=(I-A)^{-1}\Delta \mathbf{d}
\]

Interpretation: A change in final demand produces a modeled change in gross output through the total requirements matrix.

This can support planning questions: What happens if demand for construction rises? What if export demand falls? What if public investment shifts toward infrastructure? What sectors are indirectly affected by increased health spending? What happens if demand contracts during a crisis?

Scenario type Model use Interpretive warning
Final-demand increase Estimate total output required to meet added demand. Capacity and price constraints may prevent full response.
Final-demand decrease Estimate output loss associated with reduced demand. Firms may adjust through inventories, exports, or substitution.
Public investment scenario Estimate interindustry requirements of spending. Benefits depend on project quality, timing, labor markets, and opportunity cost.
Export shock Estimate domestic sector exposure to external demand. Exchange rates, contracts, inventories, and policy responses matter.
Household spending shift Estimate sectoral output changes from changed consumption patterns. Income, prices, preferences, and supply constraints are omitted.
Emergency demand scenario Estimate production needs for crisis response. Emergency logistics and bottlenecks may dominate.

Demand scenarios are structured “what if” analyses. They are not automatic forecasts of what will happen in a changing economy.

Back to top ↑

Supply-Chain Exposure

Input-output analysis can reveal upstream dependence. If a sector depends heavily on inputs from another sector, disruption in the supplier sector can affect production requirements, feasibility, and resilience. The coefficient matrix and Leontief inverse help identify these relationships at sector scale.

However, input-output models are better at showing average sector dependence than firm-specific supply-chain fragility. They may not reveal single-source suppliers, geographic bottlenecks, quality requirements, lead times, inventory buffers, contractual relationships, or critical materials.

Supply-chain question Input-output model can show Input-output model may miss
Which sectors are upstream? Direct and indirect production requirements. Specific firms, facilities, and routes.
Which sectors have high dependence? Large coefficients or total requirements. Substitution, inventory, and alternative suppliers.
Which demand drives upstream output? Final-demand scenarios and total output effects. Price response and capacity limits.
Which sectors are exposed to shocks? Modeled dependence on affected sectors. Contractual flexibility and crisis response.
Where are bottlenecks? High modeled requirement concentration. Physical bottlenecks and critical material constraints.
How does exposure change over time? Comparison across input-output tables. Rapid shifts between table updates.

Input-output analysis is strongest as a sector-level exposure map. It should be supplemented when decisions require firm-level, route-level, or product-level supply-chain detail.

Back to top ↑

Imports, Leakage, and Domestic Requirements

Imports matter because not all input requirements are produced domestically or regionally. A national or regional input-output model must distinguish domestic production effects from imported goods and services. Otherwise, it may overstate local output, employment, emissions, or value-added effects.

Leakage occurs when spending leaves the modeled region through imports, external ownership, out-of-region labor, or other channels. Domestic input-output tables, regional purchase coefficients, and import matrices help adjust interpretation.

Boundary issue Modeling consequence Review question
Imported intermediate inputs Domestic output requirements may be overstated if imports are treated as domestic. Are coefficients domestic, total, or import-adjusted?
Imported final goods Final demand may not translate into domestic production. Does demand apply to domestic output or total consumption?
Regional leakage Local multiplier may be smaller than national multiplier. Are regional purchase coefficients used?
Global supply chains Domestic sectors may depend on foreign upstream sectors. Is a multi-region input-output framework needed?
Re-exports and margins Trade and distribution accounting can complicate sector attribution. How are margins, taxes, and trade flows assigned?
Local content assumptions Policy estimates depend on domestic production shares. Are local content assumptions documented and tested?

Boundary choices strongly affect economic interpretation. A multiplier without a domestic, regional, or global boundary is incomplete.

Back to top ↑

Prices, Capacity, and Nonlinear Limits

Basic input-output models are linear quantity or value models with fixed coefficients. They generally do not model price changes, capacity constraints, substitution, inventories, rationing, strategic behavior, technological change, or nonlinear response. These limits matter especially during shocks.

Economic feature Basic input-output treatment Responsible warning
Prices Often fixed or embedded in transaction values. Price changes can alter demand, substitution, and measured flows.
Capacity Output adjusts to meet modeled demand. Real sectors may be unable to expand quickly.
Substitution Fixed input proportions. Firms may switch suppliers, materials, processes, or technologies.
Inventories Often omitted or simplified. Short-run buffers can delay production effects.
Time Often static comparative analysis. Adjustment speed, lags, and sequencing matter.
Behavior Relationships are accounting-based. Firms, consumers, governments, and workers adapt.

These limits do not make input-output analysis useless. They define its proper role: structured interdependence analysis under explicit assumptions.

Back to top ↑

Environmental and Social Extensions

Input-output models can be extended beyond output. Environmental input-output analysis connects sector output to energy use, emissions, land use, water use, waste, material flows, or ecological pressure. Social and labor extensions can connect output to employment, wages, occupational exposure, or distributional indicators.

\[
\mathbf{e}=F(I-A)^{-1}\mathbf{d}
\]

Interpretation: An environmental extension matrix \(F\) can map total production requirements into emissions, energy, water, or other footprint measures.

Extensions are powerful because they connect consumption, production, and external effects. They are risky when footprint factors are outdated, aggregated, incomplete, or treated as more precise than they are.

Extension type Output Review warning
Energy extension Energy use associated with final demand. Energy intensity can change by technology and region.
Emissions extension Greenhouse gas or pollutant footprint. Scope, boundary, and sector aggregation matter.
Water extension Water withdrawals or consumption. Regional water scarcity may not be captured by aggregate use.
Material extension Resource extraction or material throughput. Product-level composition may be hidden.
Employment extension Jobs associated with output requirements. Job quality, wages, and distribution require additional data.
Distributional extension Impacts by income, region, occupation, or community. Linkage assumptions and data coverage require careful review.

Extended input-output analysis can connect economic activity to sustainability and justice questions, but only when boundaries, data quality, and interpretation limits are explicit.

Back to top ↑

Aggregation, Data Quality, and Uncertainty

Input-output models depend heavily on data quality. Sector aggregation, outdated tables, survey gaps, imputation, price changes, imports, reclassification, confidential data suppression, and national-accounting conventions all affect results.

Data issue Model consequence Review method
Sector aggregation Different industries are averaged together. Compare broad and detailed sector levels where possible.
Old benchmark table Coefficients may not reflect current technology or supply chains. Check table year, update method, and recent structural change.
Confidentiality suppression Some transactions may be estimated or hidden. Review metadata and uncertainty notes.
Import assumptions Domestic and imported requirements may be confused. Use domestic/import distinction and test regional leakage.
Price changes Monetary values may change without physical quantity changes. Check current-price versus constant-price treatment.
Scenario uncertainty Demand changes may be speculative. Run sensitivity analysis across plausible demand vectors.

Uncertainty should be reported with input-output results. A clean matrix can still contain uncertain coefficients, outdated assumptions, and fragile scenario choices.

Back to top ↑

Mathematical Deepening

This section adds a more formal layer. Economic input-output analysis connects transaction matrices, technical coefficient matrices, Leontief systems, matrix inverses, spectral conditions, total requirements, multipliers, demand scenarios, environmental extensions, sensitivity analysis, and responsible interpretation.

Representation Review

Sector Semantics

Define whether sectors represent industries, commodities, firms, regions, institutions, or aggregated economic activities.

Transaction Semantics

State whether entries represent domestic transactions, total transactions, producer prices, purchaser prices, or adjusted flows.

Demand Semantics

Define final demand categories, scenario assumptions, and whether values are nominal, real, domestic, regional, or global.

Boundary Semantics

Record imports, exports, regional leakage, aggregation, table year, and omitted economic activity.

Matrix Review

Transaction Matrix

Use \(Z\) to record interindustry transactions before coefficient normalization.

Technical Coefficients

Use \(A\) to record input requirements per unit of sector output.

Leontief Matrix

Use \(I-A\) to form the linear system connecting final demand and gross output.

Total Requirements

Use \((I-A)^{-1}\) to estimate direct and indirect output requirements under model assumptions.

Diagnostic Review

Solvability

Check whether \(I-A\) is invertible and whether the output solution is economically plausible.

Conditioning

Inspect numerical sensitivity when matrices are large, estimated, or near structurally unstable.

Multiplier Review

Compare output, value-added, employment, emissions, or other multipliers without confusing them with welfare.

Scenario Sensitivity

Test final-demand shocks, coefficient uncertainty, import shares, aggregation levels, and domestic-content assumptions.

Responsibility Review

Uncertainty

Attach uncertainty notes to coefficients, demand scenarios, table year, imports, aggregation, and extension factors.

Validation

Compare modeled results with historical data, national-accounting constraints, sector expertise, and benchmark tables.

Policy Boundary

State what the model can support: scenario exploration, interdependence mapping, exposure review, or planning support.

Responsible Communication

Explain that multipliers, total requirements, and shock estimates are assumption-dependent, not automatic policy conclusions.

Back to top ↑

Case Study Workflow

A responsible economic input-output workflow moves from accounting definitions to technical coefficients, Leontief solution, scenario testing, and interpretation limits.

1. Define Economic Boundary

Specify geography, table year, sector system, domestic/import distinction, final-demand categories, and price basis.

2. Build Coefficient Matrix

Convert interindustry transactions into technical coefficients with documented output denominators and accounting conventions.

3. Solve Leontief System

Use \((I-A)\mathbf{x}=\mathbf{d}\) or \(\mathbf{x}=(I-A)^{-1}\mathbf{d}\) to estimate gross output requirements.

4. Compute Multipliers

Summarize direct and indirect requirements while preserving definitions and avoiding welfare overclaims.

5. Run Scenarios

Test demand shocks, coefficient uncertainty, import assumptions, domestic-content assumptions, and aggregation sensitivity.

6. Interpret Responsibly

Report what the model clarifies, what it omits, how uncertain it is, and what decisions require additional evidence.

This workflow treats input-output analysis as structured economic systems modeling, not as automatic proof of impact.

Back to top ↑

Computation and Reproducible Workflows

Computational workflows for economic input-output analysis should document sector definitions, transaction sources, coefficient construction, final-demand scenarios, matrix orientation, domestic/import treatment, table year, price basis, Leontief solution, multipliers, scenario changes, uncertainty, validation evidence, and responsible-use limits.

The companion repository treats economic input-output analysis as an auditable modeling workflow. Python, R, Julia, SQL, Haskell, C, C++, Fortran, Rust, Go, notebooks, schemas, generated outputs, Canvas artifacts, advanced reports, and calculators each support a different layer of coefficient construction, Leontief solution, multiplier diagnostics, scenario analysis, and responsible interpretation.

For this article, the computational examples build a small technical coefficient matrix, solve the Leontief system for final demand, compute output multipliers, apply a demand shock, and export a governance-ready audit report.

Back to top ↑

Python Workflow: Economic Input-Output Audit

The Python workflow below creates a synthetic three-sector economy, solves the Leontief system, computes total-requirements multipliers, applies a demand shock, and exports a structured audit record.

from __future__ import annotations

from dataclasses import asdict, dataclass
from pathlib import Path
import csv
import json


@dataclass(frozen=True)
class EconomicInputOutputAudit:
    workflow_name: str
    economy_name: str
    sector_count: int
    final_demand_total: float
    gross_output_total: float
    highest_multiplier_sector: str
    highest_output_multiplier: float
    shock_sector: str
    shock_amount: float
    gross_output_change_total: float
    solvability_warning: str
    interpretation_warning: str


SECTORS = ["agriculture", "manufacturing", "services"]

# A[i][j] = input from sector i required per unit output of sector j.
TECHNICAL_COEFFICIENTS = [
    [0.10, 0.20, 0.05],
    [0.15, 0.25, 0.10],
    [0.05, 0.10, 0.20],
]

FINAL_DEMAND = [100.0, 150.0, 200.0]


def identity(n: int) -> list[list[float]]:
    return [[1.0 if i == j else 0.0 for j in range(n)] for i in range(n)]


def subtract(A: list[list[float]], B: list[list[float]]) -> list[list[float]]:
    return [[A[i][j] - B[i][j] for j in range(len(A))] for i in range(len(A))]


def solve_linear_system(matrix: list[list[float]], rhs: list[float]) -> list[float]:
    n = len(rhs)
    aug = [row[:] + [rhs[i]] for i, row in enumerate(matrix)]

    for pivot in range(n):
        max_row = max(range(pivot, n), key=lambda r: abs(aug[r][pivot]))
        aug[pivot], aug[max_row] = aug[max_row], aug[pivot]

        pivot_value = aug[pivot][pivot]
        if abs(pivot_value) < 1e-12:
            raise ValueError("Leontief matrix is singular or nearly singular.")

        for col in range(pivot, n + 1):
            aug[pivot][col] /= pivot_value

        for row in range(n):
            if row == pivot:
                continue
            factor = aug[row][pivot]
            for col in range(pivot, n + 1):
                aug[row][col] -= factor * aug[pivot][col]

    return [aug[i][n] for i in range(n)]


def leontief_matrix(A: list[list[float]]) -> list[list[float]]:
    return subtract(identity(len(A)), A)


def inverse(matrix: list[list[float]]) -> list[list[float]]:
    n = len(matrix)
    columns = []
    for j in range(n):
        basis = [1.0 if i == j else 0.0 for i in range(n)]
        columns.append(solve_linear_system(matrix, basis))
    return [[columns[j][i] for j in range(n)] for i in range(n)]


def matvec(matrix: list[list[float]], vector: list[float]) -> list[float]:
    return [sum(row[j] * vector[j] for j in range(len(vector))) for row in matrix]


def column_sums(matrix: list[list[float]]) -> list[float]:
    n = len(matrix)
    return [sum(matrix[i][j] for i in range(n)) for j in range(n)]


def build_audit() -> EconomicInputOutputAudit:
    L_matrix = leontief_matrix(TECHNICAL_COEFFICIENTS)
    total_requirements = inverse(L_matrix)
    gross_output = matvec(total_requirements, FINAL_DEMAND)
    multipliers = column_sums(total_requirements)

    highest_multiplier_index = max(range(len(SECTORS)), key=lambda i: multipliers[i])

    demand_shock = [0.0, 25.0, 0.0]
    output_change = matvec(total_requirements, demand_shock)

    return EconomicInputOutputAudit(
        workflow_name="economic_input_output_audit",
        economy_name="synthetic_three_sector_economy",
        sector_count=len(SECTORS),
        final_demand_total=round(sum(FINAL_DEMAND), 12),
        gross_output_total=round(sum(gross_output), 12),
        highest_multiplier_sector=SECTORS[highest_multiplier_index],
        highest_output_multiplier=round(multipliers[highest_multiplier_index], 12),
        shock_sector="manufacturing",
        shock_amount=25.0,
        gross_output_change_total=round(sum(output_change), 12),
        solvability_warning=(
            "The Leontief matrix must be invertible and the solution should be checked for "
            "numerical stability, plausibility, and economically meaningful output levels."
        ),
        interpretation_warning=(
            "Input-output results depend on fixed technical coefficients, sector aggregation, "
            "domestic/import boundaries, price basis, final-demand assumptions, and capacity limits. "
            "Multipliers are not automatic measures of welfare, productivity, or policy priority."
        ),
    )


def write_outputs(output_dir: Path) -> None:
    (output_dir / "tables").mkdir(parents=True, exist_ok=True)
    (output_dir / "json").mkdir(parents=True, exist_ok=True)
    (output_dir / "reports").mkdir(parents=True, exist_ok=True)

    audit = build_audit()
    row = asdict(audit)

    with (output_dir / "tables" / "economic_input_output_audit.csv").open(
        "w", newline="", encoding="utf-8"
    ) as handle:
        writer = csv.DictWriter(handle, fieldnames=list(row.keys()))
        writer.writeheader()
        writer.writerow(row)

    (output_dir / "json" / "economic_input_output_audit.json").write_text(
        json.dumps(row, indent=2, sort_keys=True),
        encoding="utf-8",
    )

    report = [
        "# Economic Input-Output Audit",
        "",
        f"- Workflow: {audit.workflow_name}",
        f"- Economy: {audit.economy_name}",
        f"- Sector count: {audit.sector_count}",
        f"- Final demand total: {audit.final_demand_total}",
        f"- Gross output total: {audit.gross_output_total}",
        f"- Highest multiplier sector: {audit.highest_multiplier_sector}",
        f"- Highest output multiplier: {audit.highest_output_multiplier}",
        f"- Shock sector: {audit.shock_sector}",
        f"- Shock amount: {audit.shock_amount}",
        f"- Gross output change total: {audit.gross_output_change_total}",
        "",
        audit.solvability_warning,
        "",
        audit.interpretation_warning,
    ]

    (output_dir / "reports" / "economic_input_output_audit.md").write_text(
        "\\n".join(report) + "\\n",
        encoding="utf-8",
    )


if __name__ == "__main__":
    write_outputs(Path("outputs"))
    print("Economic input-output audit complete.")

This workflow keeps the coefficient matrix, Leontief solution, multiplier result, demand-shock scenario, numerical warning, and interpretation boundary together in one auditable artifact.

Back to top ↑

R Workflow: Leontief System Review

R can support the same case study by constructing a technical coefficient matrix, solving the Leontief system, computing multipliers, applying a demand shock, and exporting a responsible modeling audit.

sectors <- c("agriculture", "manufacturing", "services")

A <- matrix(
  c(
    0.10, 0.20, 0.05,
    0.15, 0.25, 0.10,
    0.05, 0.10, 0.20
  ),
  nrow = length(sectors),
  byrow = TRUE
)

rownames(A) <- sectors
colnames(A) <- sectors

final_demand <- c(100.0, 150.0, 200.0)
names(final_demand) <- sectors

I <- diag(length(sectors))
leontief_matrix <- I - A
total_requirements <- solve(leontief_matrix)
gross_output <- total_requirements %*% final_demand

multipliers <- colSums(total_requirements)

demand_shock <- c(0.0, 25.0, 0.0)
names(demand_shock) <- sectors
output_change <- total_requirements %*% demand_shock

audit_record <- data.frame(
  workflow_name = "economic_input_output_audit",
  economy_name = "synthetic_three_sector_economy",
  sector_count = length(sectors),
  final_demand_total = sum(final_demand),
  gross_output_total = sum(gross_output),
  highest_multiplier_sector = names(which.max(multipliers)),
  highest_output_multiplier = max(multipliers),
  shock_sector = "manufacturing",
  shock_amount = 25.0,
  gross_output_change_total = sum(output_change),
  solvability_warning = paste(
    "The Leontief matrix must be invertible and the solution should be checked",
    "for numerical stability, plausibility, and economically meaningful output levels."
  ),
  interpretation_warning = paste(
    "Input-output results depend on fixed technical coefficients, sector aggregation,",
    "domestic/import boundaries, price basis, final-demand assumptions, and capacity limits.",
    "Multipliers are not automatic measures of welfare, productivity, or policy priority."
  )
)

dir.create("outputs/tables", recursive = TRUE, showWarnings = FALSE)
write.csv(
  audit_record,
  "outputs/tables/r_economic_input_output_audit.csv",
  row.names = FALSE
)

print(audit_record)

This R workflow emphasizes that the Leontief solution and multiplier calculation should be exported with solvability and interpretation warnings, not only numerical outputs.

Back to top ↑

Haskell Workflow: Typed Input-Output Audit

Haskell can represent an input-output review as a typed record, preserving sector count, demand totals, multiplier findings, shock scenario, and interpretation warnings as part of the output.

module Main where

data EconomicInputOutputAudit = EconomicInputOutputAudit
  { workflowName :: String
  , economyName :: String
  , sectorCount :: Int
  , finalDemandTotal :: Double
  , grossOutputTotal :: Double
  , highestMultiplierSector :: String
  , highestOutputMultiplier :: Double
  , shockSector :: String
  , shockAmount :: Double
  , grossOutputChangeTotal :: Double
  , solvabilityWarning :: String
  , interpretationWarning :: String
  } deriving (Show)

buildAudit :: EconomicInputOutputAudit
buildAudit =
  EconomicInputOutputAudit
    "economic_input_output_audit"
    "synthetic_three_sector_economy"
    3
    450.0
    702.98
    "manufacturing"
    1.75
    "manufacturing"
    25.0
    43.75
    "The Leontief matrix must be invertible and the solution should be checked for numerical stability and plausibility."
    "Input-output results depend on fixed coefficients, aggregation, domestic/import boundaries, price basis, final-demand assumptions, and capacity limits."

main :: IO ()
main =
  print buildAudit

The typed record keeps the economic result and responsible-use boundary attached to the same modeling artifact.

Back to top ↑

SQL Workflow: Input-Output Governance Registry

SQL can document input-output assumptions when sector models support repositories, dashboards, policy analysis, sustainability accounting, regional planning, or institutional decision systems.

CREATE TABLE economic_input_output_governance_registry (
    governance_key TEXT PRIMARY KEY,
    governance_name TEXT NOT NULL,
    modeling_role TEXT NOT NULL,
    review_requirement TEXT NOT NULL,
    responsible_use_warning TEXT NOT NULL
);

INSERT INTO economic_input_output_governance_registry VALUES
(
  'sector_definition',
  'Sector definition',
  'Defines the industries or commodities represented by rows and columns.',
  'Document sector classification, aggregation level, region, table year, and table source.',
  'Sector aggregation can hide specialized supply-chain bottlenecks and distributional effects.'
);

INSERT INTO economic_input_output_governance_registry VALUES
(
  'coefficient_construction',
  'Coefficient construction',
  'Defines how transactions are converted into technical coefficients.',
  'Record transaction source, output denominator, price basis, domestic/import treatment, and matrix orientation.',
  'Technical coefficients are assumptions about fixed production relationships, not timeless production laws.'
);

INSERT INTO economic_input_output_governance_registry VALUES
(
  'leontief_solution',
  'Leontief solution',
  'Solves total gross output required for final demand.',
  'Check invertibility, numerical stability, plausibility, and economically meaningful output levels.',
  'A mathematically valid solution may still be infeasible under capacity, price, labor, or material constraints.'
);

INSERT INTO economic_input_output_governance_registry VALUES
(
  'multiplier_interpretation',
  'Multiplier interpretation',
  'Summarizes direct and indirect output requirements.',
  'Define the multiplier type and attach accounting boundaries.',
  'Multipliers are not automatic measures of welfare, productivity, social value, or policy priority.'
);

INSERT INTO economic_input_output_governance_registry VALUES
(
  'demand_scenario',
  'Demand scenario',
  'Defines the final-demand vector or demand shock being modeled.',
  'Document scenario source, units, timing, price basis, affected sectors, and uncertainty.',
  'Demand shocks are what-if assumptions, not forecasts, unless externally validated.'
);

INSERT INTO economic_input_output_governance_registry VALUES
(
  'import_boundary',
  'Import boundary',
  'Distinguishes domestic requirements from total requirements.',
  'State whether coefficients are domestic, total, import-adjusted, regional, national, or multi-region.',
  'Local and domestic effects can be overstated when import leakage is ignored.'
);

INSERT INTO economic_input_output_governance_registry VALUES
(
  'extension_factors',
  'Environmental and social extension factors',
  'Maps production requirements into emissions, energy, water, labor, income, or other indicators.',
  'Document extension source, year, units, sector match, and uncertainty.',
  'Extensions can inherit both coefficient uncertainty and footprint-factor uncertainty.'
);

INSERT INTO economic_input_output_governance_registry VALUES
(
  'decision_boundary',
  'Decision boundary',
  'Defines what the model can and cannot support.',
  'Attach interpretation limits, uncertainty notes, validation status, and stop-use conditions to outputs.',
  'Input-output analysis should inform economic systems reasoning, not replace accountable policy judgment.'
);

SELECT
    governance_name,
    modeling_role,
    review_requirement,
    responsible_use_warning
FROM economic_input_output_governance_registry
ORDER BY governance_key;

This registry keeps sector definitions, coefficient construction, Leontief solution checks, multiplier interpretation, demand scenarios, import boundaries, extension factors, and decision limits visible in the modeling workflow.

Back to top ↑

GitHub Repository

The companion repository for this article is designed as a reproducible economic input-output modeling workspace. It supports technical coefficient construction, Leontief matrix solving, total requirements analysis, multiplier diagnostics, final-demand shock scenarios, import-boundary review, extension-factor documentation, governance tables, generated artifacts, advanced audit reports, and reusable calculator scripts.

Back to top ↑

Interpretive Limits and Responsible Use

Economic input-output analysis is powerful because it reveals interindustry dependence in a transparent matrix form. It can show how final demand connects to gross output, how indirect requirements travel through sectors, how multipliers summarize modeled production needs, and how environmental or social extensions connect economic activity to broader system impacts.

Its limits are equally important. Basic input-output models assume fixed technical coefficients, stable production relationships, linear scaling, sector averages, and a defined accounting boundary. They usually do not capture price changes, capacity constraints, substitution, inventories, time delays, firm-level bottlenecks, behavioral response, policy feedback, or distributional welfare by themselves.

Responsible economic input-output analysis requires documented sector definitions, table sources, coefficient construction, domestic/import boundaries, price basis, final-demand assumptions, multiplier type, extension factors, uncertainty, validation status, and decision-use limits. A useful model does not claim to predict the whole economy. It clarifies structured interdependence and helps analysts ask better questions about demand, production, exposure, sustainability, and policy responsibility.

Back to top ↑

Back to top ↑

Further Reading

Back to top ↑

References

Back to top ↑

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top