The inverse matrix and the Leontief model: what replaces division

34 min · 6 drills

In the textbook: Ch. 7.4 Die Inverse einer Matrix7.5 Input-Output-Analyse

So far matrices have been multiplied. Sometimes, though, the product is known and one of the factors is not. With numbers you would divide, but you cannot divide by a matrix, and instead of dividing you take the inverse matrix. This article is about it and about the task it is most often computed for in economics.

Imagine a region where a power plant and a coal mine work for each other: the mine needs electricity to dig coal, and the plant needs coal to make electricity. The planner has to decide how much each should produce so that, after their deliveries to each other, the market gets exactly as much as it asks for. Too little, and the city runs short of power. Too much, and the coal piles up on the heap.

With one plant it would be simple:

QuestionOne plantTwo that supply each other
How much to producewhat the market needs: 140depends on the other's output
What is unknownone numbera whole column

Such a task is called the Leontief model. It is exactly the inverse matrix that solves it. The same inverse solves an equation in which a whole table is unknown. For a 2×2 matrix you find the inverse in a minute with the formula from the formula sheet. In the exam matrix equations appear in 10 tasks across 13 exams from 2023 to 2026.

The numbers:

  • Per unit of coal the mine uses 0.4 units of electricity.
  • Per unit of electricity the station burns 0.5 units of coal.
  • The market needs 140 units of electricity and 50 units of coal.

How much must each produce?

Exactly 140 and 50 is too little: part goes to the neighbour. Adding that share is not enough either: the extra again needs something from the neighbour. Each sector's output depends on the other's. So the output is not built up extra by extra but found at once, with one formula using the inverse matrix.

For these figures the result is: the power station 200 units of electricity, the mine 150 units of coal. Check: for 150 units of coal the mine needs 0.4⋅150=60 units of power, leaving 200−60=140 for the market; for 200 units of power the station needs 0.5⋅200=100 units of coal, leaving 150−100=50 for the market.

Check yourself. An exam-level task: which entry stands in row 1 and column 2 of the inverse of A=(3512)?

The inverse matrix: what replaces division

With numbers, 3x=12 is solved by dividing by 3. Dividing by 3 is multiplying by 13, the number that 'undoes' the three: 13⋅3=1. It is also written 3−1. Then x=3−1⋅12=4.

There is no division by a matrix. But you can look for a matrix that 'undoes' the given one, as 13 undoes 3. The role of one is played by the identity matrix I: a square table with ones on the main diagonal, from the top left corner to the bottom right, and zeros in all other cells (more in the article 'Matrix multiplication: why row times column'). It changes nothing when you multiply: I⋅X=X for any X of a fitting size. So we need a matrix C with C⋅A=I and A⋅C=I.

Take A=(2153) and C=(3−1−52) and multiply them, one cell per step:

A times C: each cell of the product is a row of A times a column of C, and the result is the identity matrixA2153C3−1−52×1???=

2 · 3 + 1 · (−5) = 1

Step 1 of 4Row 1 times column 1

2⋅3+1⋅(−5)=6−5=1.

The reverse order gives I too: in cell (1,1) of C⋅A, 3⋅2+(−1)⋅5=1, and so on. Such a matrix is the inverse of A (“inverse Matrix”, “Inverse”), written A−1 like 3−1:

A⋅A−1=A−1⋅A=I

Only a square matrix can have an inverse, and not every one does. In (1224) the second row is twice the first. Multiply it from the right by any matrix, and the product's second row is again twice its first; the rows (10) and (01) of I are not linked like that. Nothing undoes such a matrix, as nothing undoes multiplying by 0.

The determinant: when the inverse exists and how to find it

How do you find C for A=(2153)? Compare C with A:

  • the numbers 2 and 3 on the main diagonal, top left to bottom right, have swapped places;
  • the numbers 1 and 5 on the other diagonal stayed where they were and got a minus.

Now take A=(4322):

  • swap the numbers on the main diagonal, 4 and 2;
  • change the sign of the numbers on the other diagonal, 3 and 2;
  • multiply A by the result:
(4322)⋅(2−3−24)=(4⋅2+3⋅(−2)4⋅(−3)+3⋅42⋅2+2⋅(−2)2⋅(−3)+2⋅4)=(2002)

The result is not I but 2⋅I: the zeros fit, and the diagonal holds 2=4⋅2−3⋅2, the product of the main diagonal minus that of the other one. Dividing by it gives I. For the first matrix this number is 2⋅3−1⋅5=1, so no division was needed.

For any 2×2 matrix with the entries a,b in the first row and c,d in the second, the same product equals (a⋅d−b⋅c)⋅I. The number a⋅d−b⋅c is the determinant (“Determinante”), written det⁡(A). Both formulas are on the formula sheet:

det⁡(A)=a⋅d−b⋅c,A−1=1det⁡(A)(d−b−ca)

If det⁡(A)=0, there is nothing to divide by and no inverse, as for (1224): 1⋅4−2⋅2=0. Such a matrix is singular (“singulär”).

An entry of the inverse (“Inverse”) and when there is none

The formula for the inverse divides by the determinant, and the first exam task hinges on that division: the matrix contains a parameter, and the question is for which value the division becomes impossible:

Exam-style task

Für welchen Wert des Parameters p besitzt die Matrix

A=(p6−78)

keine Inverse?

  1. a)5.25
  2. b)Fu¨r keinen Wert von p
  3. c)−5.25
  4. d)421
  5. e)−421

You recognise the task by the words 'no inverse' and a parameter p among the entries. There is no inverse exactly when there is nothing to divide by: the determinant is 0. So the inverse itself need not be built; one equation for p is enough.

main diagonal: its product 8p

No inverse: set the determinant with the parameter p to zeroAp6−78
Step 1 of 4Main diagonal

Product of the main diagonal: p⋅8=8p.

The parameter task looks for exactly the case det⁡A=0. In a task about one entry of the inverse, 'the matrix is not invertible' is often an option, so there too the determinant comes first, before any swapping.

Given is the matrix A=(23−2−4). Which entry stands in row 2 and column 2 of its inverse?

2⋅(−4)−3⋅(−2)=−8+6=−2. Not zero: the inverse exists.

2 and −4 swap places: (−43−22).

3 and −2 stay where they are and change sign: (−4−322).

Each number is divided by −2: A−1=(21.5−1−1). Row 2, column 2 holds −1.

A−1⋅A, cell (1,1): 2⋅2+1.5⋅(−2)=1; cell (2,2): (−1)⋅3+(−1)⋅(−4)=1. Off the diagonal: zeros. This is I.

Which entry stands in row 1 and column 2 of the inverse of A=(4612)? Determinant 4⋅2−6⋅1=2. After the swap and the sign change: (2−6−14). The number we need, −6, divided by the determinant: −6/2=−3. Check, cell (1,2) of A⋅A−1: 4⋅(−3)+6⋅2=0, as in I.

Other forms of the same question

  • Calculate first, then invert. If A=P−Q or A=M−2I, find A entry by entry first, then its determinant. The inverse of a difference is not the difference of the inverses.
  • A multiple: for B=4A the inverse is B−1=14A−1. Check: 4A⋅14A−1=AA−1=I.
  • The transpose: (AT)−1=(A−1)T, so look for entry (1,2) in position (2,1) of A−1.
  • The parameter appears twice: for (p664p) the determinant is 4p2−36, and there is no inverse for p=3 and for p=−3. The answer 9 is p2: the root was not taken, and −3 is lost.

Your turn1 of 6

Which entry stands in row 2 and column 1 of the inverse of A=(2514)? Round to two decimal places.

Your turn2 of 6

A=P−Q, where P=(5243) and Q=(1021). Which entry stands in row 1 and column 1 of A−1?

Traps. These are the mistakes the wrong options of the task with the parameter p at the start of this section are built from:

  • Determinant with a plus, option (a), 5.25: the diagonal products were added, 8p+6⋅(−7)=8p−42, giving p=5.25. Check: put the answer into a⋅d−b⋅c; it must give 0.
  • Deciding there is no such value, option (b): here the determinant is 8p+42, and such an equation always has a solution.
  • Determinant with a plus and the reciprocal, option (d), 421: the sign error, then 1/5.25.
  • The reciprocal instead of p, option (e), −421: the equation was solved correctly, but 1/p was given; the parameter itself is asked for.

Other mistakes from tasks of this kind:

  • One entry of the inverse: not dividing by the determinant, taking it with the opposite sign, b⋅c−a⋅d, not swapping the diagonal, or inverting each entry, 1/aij. The sheet's formula divides the whole matrix by one number, a⋅d−b⋅c.

Solving a matrix equation (“Matrixgleichung”)

In the first task the inverse was wanted for its own sake. In the second it stands in for division: the unknown in the equation is a whole matrix X, like x in 3x=12:

Exam-style task

Multipliziert man X von links mit A, so erhält man X plus B, also AX=X+B. Mit

A=(−2−153),B=(−6610−9)

ist das Element x11 der Lösung gesucht.

  1. a)8
  2. b)−2
  3. c)1
  4. d)11
  5. e)2

You recognise the task by an equation with an unknown matrix X and a question about one of its entries. Here X appears on both sides of the equals sign: 'by A from the left', 'plus B'.

As 3x=12 was solved by multiplying by 3−1, X comes out of AX=B if both sides are multiplied by A−1 from the left: A−1AX=IX=X. From the right it fails: in AXA−1, A and A−1 are not side by side, and factors may not be swapped, AB≠BA. Hence the side rule:

AX=B  ⇒  X=A−1B,XA=B  ⇒  X=BA−1

AX − X = B

X = (A − I)⁻¹ · B: the inverse stands on the left because A stood to the left of XA−2−153B−6610−9×
Step 1 of 5Bring X to one side

Subtract X from both sides: AX−X=B.

Now X stands on the left: solve XA=2X+C, where A=(4113) and C=(3214).

XA−2X=C.

2X=X⋅2I, so X(A−2I)=C. Now X is left of the bracket, so the inverse goes on the right.

A−2I=(2111), determinant 2−1=1, inverse (1−1−12).

X=C(A−2I)−1=(3−2−3+41−4−1+8)=(11−37). Check: XA=(54−518), and 2X+C gives the same matrix. The inverse on the left would give (2−2−16).

One entry of the solution. Solve AX+B=C for A=(2111), B=(1021), C=(5344). Rearranging: AX=C−B=(4323). A stands on the left, so X=A−1(C−B), and A−1=(1−1−12). Find x22.

Other forms of the same question

Which forms occur and where the inverse goes:

Equationsimplifiedsolution
AX+B=CAX=C−BX=A−1(C−B)
XA+B=CXA=C−BX=(C−B)A−1
AX+BX=C(A+B)X=CX=(A+B)−1C
XA+B=XC+DX(A−C)=D−BX=(D−B)(A−C)−1
AX=X+C(A−I)X=CX=(A−I)−1C
XA=2X+BX(A−2I)=BX=B(A−2I)−1
AXA−1+A=IAXA−1=I−AX=A−1(I−A)A
XTA=IXT=A−1X=(A−1)T

With X between two matrices, multiply twice: on the left by the inverse of the left matrix, on the right by that of the right one. In AX+XB there is no common factor, since X stands once on each side; check such a form by substituting the options.

The unknown is transposed. Express XT as you would X, and transpose only at the end: x12=(XT)21.

Only the determinant is needed. The determinant of a product is the product of the determinants, so MX=N gives det⁡X=det⁡N/det⁡M, without the inverse. If M is A−C, calculate the difference first: det⁡(A−C)≠det⁡A−det⁡C.

Your turn3 of 6

Solve XA=X+C, where A=(3112) and C=(4262). Which entry stands in row 2 and column 1 of X?

Your turn4 of 6

For A=(5234), C=(2112) and D=(4224) we have (A−C)X=D. What is det⁡X? Round to two decimal places.

Traps. Each mistake in moving X gives a wrong option of its own in the task AX=X+B at the start of this section:

  • Losing the X on the right-hand side, option (a), 8: AX=B was solved, X=A−1B. Check: all terms with X go to one side before factoring out.
  • Not dividing by the determinant, option (b), −2: the determinant is −1, so without the division the whole inverse has the wrong sign.

Other mistakes from tasks of this kind:

  • Factoring X out to the wrong side: writing (A−I)X for XA−X. X stands left of A and stays there: X(A−I).
  • The inverse on the wrong side: in (A−2I)X=B+C, writing (B+C)(A−2I)−1 instead of (A−2I)−1(B+C). The inverse goes on the side where the factor stood.
  • Matrix minus a number: A−1 instead of A−I, subtracting one from every entry; I changes only the diagonal.
  • Signs: when rearranging, +B becomes −B; in the inverse, b and c change sign.
  • Forgetting to transpose: in XTA=I, an entry of XT was given as that of X.

On the sheet there is only the 2×2 inverse; the side rule you must know.

Sector output from final demand (“Endnachfrage”, Leontief)

In the second task the matrix equation was given ready-made. In the third you first set it up yourself, from the table of deliveries between units:

Exam-style task

Eine Universität hat drei Servicebetriebe (E = EDV-Dienst, D = Druckerei, H = Haustechnik). Sie erbringen einander Leistungen und arbeiten außerdem für externe Auftraggeber (Endnachfrage). Die Jahreswerte in Mio. GE, Leistung von der Zeile an die Spalte:

EDHEndnachfrageGesamtproduktionE2304466580920D928866194440H13811011082440

Externe Auftraggeber bestellen künftig bei E 35 % mehr; die übrige Endnachfrage ändert sich nicht. Zwei Matrizen stehen zur Auswahl, nur eine davon ist (I−A)−1:

M1=(1.44090.28820.34580.24981.38330.32660.37140.51871.5114),M2=(1.44090.13780.16540.52221.38330.32660.77660.51871.5114)

Wie viel mehr muss D dadurch insgesamt produzieren? Geben Sie eine ganze Zahl an.

  1. a)51
  2. b)93
  3. c)106
  4. d)491
  5. e)70

You recognise the task by a flow table of units that work for each other and by the question how much more a unit has to produce in total when final demand grows. The input matrix is not given: you compute it from the table in the task, as in the example with three units below.

Back to the station and the mine:

  • electricity goes to the mine, 0.4 per unit of coal, and to the market, 140;
  • coal goes to the station, 0.5 per unit of electricity, and to the market, 50.

Call the station's output x1 and the mine's x2. Two names are needed below:

  • total output (“Gesamtproduktion”, or “Bruttoproduktionswert”): everything a sector produces, here x1 and x2;
  • final demand (“Endnachfrage”): the demand of the market, 140 and 50.

Each output is the delivery to the neighbour plus the final demand:

x1=0⋅x1+0.4 x2+140,x2=0.5 x1+0⋅x2+50

On the right is row times column: the input matrix (“Inputmatrix”) A=(00.40.50) times the output x, plus the demand b. The number 0.4 in row 1, column 2 means: per unit of coal, 0.4 units of electricity are used. In general aij is how many units from sector i are used per unit of output of sector j: column j is the recipe of sector j. This is the sheet's formula, x=Ax+b. Move Ax to the left and factor out x:

x=Ax+b  ⟺  (I−A)x=b  ⟺  x=(I−A)−1bI−A=(1−0.4−0.51)

You invert this I−A for the power station and the mine yourself, in the exercise “What do the station and the mine produce?” at the end of this section. The matrix (I−A)−1 is the Leontief inverse (“Leontief-Inverse”). In the examples below b is the column 'final demand'. In one of them the question is not the output itself but its increase. The formula is linear, so it holds for increases too: Δx=(I−A)−1Δb.

Two sectors have the input matrix A=(0.30.20.10.4), and final demand b=(100150). How much must each produce?

column 1: how much both sectors use per unit of output of sector 1

Input matrix of two sectors, I − A, Leontief inverse and output for the given demandAsector 1sector 2sector 1sector 20.30.20.10.4
Step 1 of 5Read the input matrix

Column 1: per unit of output, sector 1 takes 0.3 of its own product and 0.1 of sector 2's.

The task as it was set in an exam:

A university has three service units: C, the computing service; P, the print shop; B, building services. They work for each other and for outside clients. The table gives the yearly deliveries in million GE, money units, service goes from the row to the column; final demand and total output: C 580 and 920, P 194 and 440, B 82 and 440. Outside demand for C's services rises by 35 %, the rest stays the same. Two matrices M1 and M2 are given, and only one of them is (I−A)−1. Question: how much more does P have to produce? Here we pick the inverse; the next example computes the increase.

column C: 230, 92, 138 with an output of C of 920

The input matrix from the flow table, I − A and the check of the candidatedeliveriesCPBCPB2304466928866138110110
Step 1 of 4Read the flow table

Services go from the row to the column. Column C is what the computing service received from the three units: 230, 92 and 138, for an output of 920.

Now the inverse works on the increase in demand.

Δb: 35 % of 580 = 203, zero for P and B

The inverse M₁ times the increase in demand Δb: one cell is enoughM₁CPBCPB1.44090.28820.34580.24981.38330.32660.37140.51871.5114ΔbCPB20300×???=
Step 1 of 2The increase in demand

Only the demand for C rises: Δb=(0.35⋅58000)=(20300). The percentage is of the final demand 580, not the output 920.

What do the station and the mine produce? Here I−A=(1−0.4−0.51), the determinant is 1−0.2=0.8, and (I−A)−1=10.8(10.40.51). Multiply by the demand b=(14050) and divide by the determinant.

Other forms of the same question

  • Output given, demand asked: no inverse is needed, b=(I−A)x=x−Ax. For sector 1: b1=x1−(a11x1+a12x2+a13x3).
  • A flow table is given (“Verflechtungstabelle”): aij=xij/xj, by columns, as in the example with three units above.
  • Demand changes: the rise in output is Δx=(I−A)−1Δb; if only sector j's demand rises, only column j of the inverse is needed.
  • One sector's deliveries to other sectors: first the new output x, then the sector's row in Ax, without final demand.

Your turn5 of 6

In an economy of two sectors the input matrix is A=(0.20.30.40.1) and final demand is b=(6090). How much must sector 2 produce?

Your turn6 of 6

Input matrix A=(0.10.20.30.4), the sectors produced x=(200250). How much of the product of sector 2 went to the market?

Traps. In the output task these mistakes produce the wrong options:

  • The wrong inverse, option (c), 106: M2 was taken, 0.5222⋅203≈106. M2 divides by rows, by the output of the supplying unit. Check: one off-diagonal cell of (I−A)⋅M must be 0.
  • New output instead of the increase, option (d), 491: row P of M1 was multiplied by the new demand (78319482). That is the whole new output of P, 440+51, not its rise.

Other mistakes from tasks of this kind:

  • Only the first rounds of deliveries: Δb+AΔb+A2Δb, here 203⋅(0.1+0.0675)≈34. But those deliveries need deliveries too, round the circle; the inverse adds all rounds at once.
  • Where you compute the inverse yourself: not changing the sign on the other diagonal, not dividing by the determinant, giving demand as output. Output always exceeds demand, since part goes to other sectors; the delivery check catches all three.

On the sheet: the Leontief model x=Ax+b, where b is final demand. x=(I−A)−1b follows in two steps, as above.

At a glance: three methods and the formula sheet

The topic in a minute

  • Inverse: AA−1=A−1A=I; for 2×2 swap the main diagonal, change the sign on the other one, divide by det⁡(A)=a⋅d−b⋅c. With det⁡=0 there is no inverse. Trap: forgetting the division or the sign.
  • Matrix equation: gather X on one side, factor it out on the side where it stands, a number as kI; AX=B⇒X=A−1B, XA=B⇒X=BA−1. Trap: the inverse on the wrong side.
  • Leontief: x=Ax+b, hence x=(I−A)−1b; with output given, b=(I−A)x; aij=xij/xj. Trap: inverting A or giving demand as output.
  • The inverse of a 2×2 matrix

    An entry of the inverse of a 2×2 matrix is needed, or the value of a parameter for which there is no inverse. First the determinant, then the swap, the signs and the division.
    A−1=1ad−bc(d−b−ca)

    Trap: forgetting the signs or the division: the minus goes on b and c, and everything is divided by ad−bc.

  • Matrix equation

    An equation with the unknown matrix X, for example AX−B=2X+C. Gather X on one side, factor it out and multiply by the inverse from the side where the factor stands.
    AX=B⇒X=A−1B,XA=B⇒X=BA−1

    Trap: subtracting a number from a matrix; 2X is factored out as 2I⋅X, with the identity matrix I.

  • The Leontief model

    Sectors supply each other and the market; the output x for the demand b is needed. After the deliveries Ax are taken off, output covers demand, hence the inverse of I−A.
    x=(I−A)−1⋅b

    Trap: inverting the matrix A itself; it is I−A that is inverted.

On the exam's formula sheet: det⁡(A)=a⋅d−b⋅c, A−1=1det⁡(A)(d−b−ca) and the Leontief model x=Ax+b. The side rule, I instead of a number and dividing by columns you must know.

The chapter has eight kinds of task, and on similar problems they are easy to confuse. In 'Which method? Matrices' they stand side by side.

Cards to memorise

Tap a card to see the formula. All topic cards

Formula

AX=B and XA=B: what is X in each case?

Formula

How do you factor X out of AX−2X?

Now practise it

The inverse matrix and the Leontief model: what replaces division

Trainer · Matrices

Practise
Next: Which method? Matrices
0/6

Was this article helpful?