Leontief Input-Output Model

Leontief explained his input-output model in the April 1965 issue of Scientific American (cited in Barrett, et al., 1992, p. 255). Leontief organized the 1958 American economy into an 81x81 matrix. The 81 sectors of the economy, such as steel, agriculture, manufacturing, transportation, and utilities, each represented resources which rely on input from the output of other resources. For example, production of agriculture requires an input of manufacturing, transportation, and even some agriculture. The following technology matrix (Barrett, et al., p. 264) represents a small section of the 81x81 Leontief economic model.

The production of 1 unit of output of

Units are usually measured in dollars.

TECHNOLOGY MATRIX

Problem Statement
If the economy produces 900 million dollars of petroleum, 300 million dollars of textiles, 850 million dollars of transportation, and 800 million dollars of chemicals, how much of this production is internally consumed by the economy? further explanation

Input/Output Description
Input - a two-dimensional (4,4) array called tech which represents the technology matrix and a one-dimensional (4) array called prod which represents the production matrix.
Output - a one-dimensional (4) array called int which represents the internal consumption matrix (the dollars of petroleum, textiles, transportation, and chemicals consumed to produce the 900 million dollars of petroleum, 300 million dollars of textiles, 850 million dollars of transportation, and 800 million dollars of chemicals)

Mathematical Equation
The internal consumption matrix will be given by the product of the technology and production matrices (see matrices for an explanation of matrix multiplication).

Algorithm
1. Read the data from tech.dat and prod.dat into the arrays tech and prod, respectively.
2. Multiply the two matrices (represented by arrays tech and prod).
3. Print the contents of the int array (representing the internal consumption matrix)

Code
c       The following program will find the internal consumption matrix
c       by multiplying the technology matrix array (read from tech.dat) and 
c       the production matrix, entered in array prod from the keyboard.

        PROGRAM economy

        INTEGER rows, columns, row, column
        PARAMETER (rows=4,columns=4)
        REAL tech(rows,columns), prod(rows), int(rows)
        DATA int(1)/0.0/

c       Opens the data file tech.data which contains the production inputs
c       for petroleum, textiles, transportation, and chemicals.

        OPEN(UNIT=30, FILE='tech.dat')

c       Values are stored in a two dimensional array by columns (starting at
c       the top of the first column and going down the column, then back up
c       to the top of the second column and so on).  The values were listed
c       in that same way in tech.dat.

        READ (30,*) tech

c       Display tech to verify that the values were stored correctly.

        PRINT *
        PRINT *, 'TECHNOLOGY MATRIX'
        DO 100 row = 1,rows
           PRINT 5, (tech(row,column), column=1,columns)
5          FORMAT (4(F4.2,3x))
100     CONTINUE

c       Prompt the user for the production output and read these values
c       into prod.

        PRINT *
        PRINT *,'Enter the production output (in millions of dollars) '
        PRINT *,'for petroleum, textiles, transportation, and chemicals '
        PRINT *,'in that order.'
        READ *, (prod(row), row=1,rows)

c       Multiply the technology matrix (array tech) and the production
c       matrix (array prod) to get the internal consumption matrix (int)
c       The result of the multiplication of two matrices is the sums of
c       the products of each row with each column.  In this case, tech
c       has four rows and prod has one column, so we are finding the sum
c       of the products of the entries in the row 1 of tech and the
c       entries in column 1 of prod to get the first entry in int; then
c       we do the same thing with row 2 and column 1, row 3 and column 1
c       and row 4 and column 1.  The first element of int is
c       tech(1,1)*prod(1) + tech(1,2)*prod(2) + tech(1,3)*prod(4) +
c       tech(1,4)*prod(4).  To get the second element of int we change to
c       row 2 and so on.

        DO 200 row=1,rows
           DO 300 column = 1, columns
                int(row) = int(row) + tech(row,column)*prod(column)
300        CONTINUE
200     CONTINUE

c       Print the internal consumption matrix, the millions of dollars
c       of petroleum, textiles, transportation, and chemicals produced used 
c       internally in the production.

        PRINT *
        PRINT *, 'INTERNAL CONSUMPTION (in millions of dollars)'
        PRINT '("Petroleum",T20,F6.2)', int(1)
        PRINT '("Textiles",T20,F6.2)', int(2)
        PRINT '("Transportation",T20,F6.2)', int(3)
        PRINT '("Chemicals",T20,F6.2)', int(4)
        END

Output

TECHNOLOGY MATRIX
0.10   0.40   0.60   0.20
0.00   0.10   0.00   0.10
0.20   0.15   0.10   0.30
0.40   0.30   0.25   0.20

Enter the production output (in millions of dollars)
for petroleum, textiles, transportation, and chemicals
in that order.
900
300
850
800

INTERNAL CONSUMPTION (in millions of dollars)
Petroleum          880.00
Textiles           110.00
Transportation     550.00
Chemicals          822.50