Mathematical background#
This chapter describes how BONSAI compiles the supply and use tables into a technology matrix and calculates footprints. The figures come from the Getting The Data Right project. They show how the concepts relate to one another. The equations below describe the current BONSAI-IO calculation.
From sectors to activities and products#
In a symmetric input-output table, the rows and columns use the same classification. A matched row and column can both represent a sector or a product.

A supply and use table separates products from activities. An activity can supply several products. Different activities can also supply the same type of product. BONSAI keeps these roles separate in its graph.

In the BONSAI footprint matrix, each row identifies a product, its location and its characteristic unit. Each column identifies an activity and its location. The supply matrix \(V\) records outputs. The use matrix \(U\) records inputs. Both matrices use the same axes.
Markets and valuation#
Markets connect products from different origins to users in the destination region. National mixes can aggregate production before trade. Market inputs can include transport, trade services and net taxes on products. Basic prices describe producer revenue. Purchaser prices include the applicable margins and net product taxes.


The market and valuation figures show the purpose of these accounts. See the current market model for BONSAI routing and price treatment.
Final demand and property layers#
The nonmarket and property-layer figures show how an accounting system can separate consumption, stocks, environmental exchanges and other extensions. The blocks are conceptual. The current matrix compiler excludes final-demand nodes from the activity columns. Final demand and elementary exchanges have separate accounts.


A graph exchange can have multiple property layers. For example, a product exchange can have both a physical quantity and a monetary value. The footprint matrix uses the characteristic quantity of each product exchange. Its product rows can therefore use different units. Environmental and labor extension rows also keep their respective units.
From the balanced graph to the footprint#
The balanced graph records the supply and use of products. For the b1 footprint, Stone substitution makes a separate graph for the footprint calculation. It adjusts the relevant exchanges for supported recovery routes and leaves the balanced graph intact. The matrix compiler reads the exchanges from this graph. See by-product technology modelling.
The full technology matrix is \(T=V-U\). Positive net entries act as supplies. Negative net entries act as requirements. This matrix can have more product rows than activity columns.
Each activity has one distinct reference product with a positive supply. BONSAI orders these reference rows to match the activity columns. Let \(R\) select these rows in this order. The square reference matrix is \(T_R=RT\). The footprint solver uses this block. BONSAI keeps other rows for physical balance checks. The transposed solve assigns zero to these rows under the current cut-off convention.
For final demand \(y\), let \(y_R=Ry\). Let \(x\) contain the activity scale factors. BONSAI solves
Let \(E\) be a matrix of direct extensions with activities on the columns. Total extensions for the demand are \(Ex\). For footprints per unit of reference product, BONSAI solves
\(F_R\) has extension rows and reference-product columns. For a nonsingular \(T_R\), it follows that \(F_R=ET_R^{-1}\) and \(F_R y_R=Ex\). BONSAI uses sparse linear solves for both calculations.
For example, take two activities with reference supplies of 10 and 5 units. The second activity uses 2 units of the first product. The first activity uses 1 unit of the second product. With a demand of 5 units of the second product,
If one direct extension has activity values \(E=[3,\ 4]\), its total for this demand is \(115/24\). The footprint per unit of the second product is \(23/24\).
The symmetric input-output form#
In the textbook case, each activity supplies only its own reference product in the reference block. The reference supply matrix is then diagonal. Write this diagonal as \(D\) and the reference use matrix as \(U_R\). The direct requirements matrix is \(A=U_R D^{-1}\). Each column gives inputs per unit of the associated reference output.
With \(q=Dx\), the same demand equation becomes \((I-A)q=y_R\). In this case, \((I-A)^{-1}\) is the Leontief inverse. This form explains the link to a symmetric input-output table. BONSAI uses \(T_R\) directly and can retain off-diagonal reference supplies.
Source files and credits#
The original mathematical background contains the full historical account. The figure sources include the YAML specifications and the generated TeX files. See also the Getting The Data Right contributor credits.
Figure |
Editable files |
|---|---|
Symmetric |
|
Make-use |
|
Markets |
|
Valuation |
|
Nonmarket |
|
Property layers |
The figures retain the original MIT notice.