📚 Applied Finite Mathematics
⇩ Download ▾

2.1 Matrices

Chapter Overview

In this chapter, you will learn to:

  1. Do matrix operations.
  2. Solve linear systems using the Gauss-Jordan method.
  3. Solve linear systems using the matrix inverse method.
  4. Do application problems.

Introduction to Matrices

Section Overview

In this section you will learn to:

  1. Add and subtract matrices.
  2. Multiply a matrix by a scalar.
  3. Multiply two matrices.

A matrix is a rectangular array of numbers. Matrices are useful in organizing and manipulating large amounts of data. In order to get some idea of what matrices are all about, we will look at the following example.

Before we go any further, we need to familiarize ourselves with some terms that are associated with matrices. The numbers in a matrix are called the entries or the elements of a matrix. Whenever we talk about a matrix, we need to know the size or the dimension of the matrix. The dimension of a matrix is the number of rows and columns it has. When we say a matrix is a 3 by 4 matrix, we are saying that it has 3 rows and 4 columns. The rows are always mentioned first and the columns second. This means that a 3×4 size 12{3 times 4} {} matrix does not have the same dimension as a 4×3 size 12{4 times 3} {} matrix. A matrix that has the same number of rows as columns is called a square matrix. A matrix with all entries zero is called a zero matrix. A square matrix with 1's along the main diagonal and zeros everywhere else, is called an identity matrix. When a square matrix is multiplied by an identity matrix of same size, the matrix remains the same. A matrix with only one row is called a row matrix or a row vector, and a matrix with only one column is called a column matrix or a column vector. Two matrices are equal if they have the same size and the corresponding entries are equal.

Matrix Addition and Subtraction

If two matrices have the same size, they can be added or subtracted. The operations are performed on corresponding entries.

Multiplying a Matrix by a Scalar

If a matrix is multiplied by a scalar (a constant number), each entry is multiplied by that scalar.

Multiplication of Two Matrices

To multiply a matrix by another is not as easy as the addition, subtraction, or scalar multiplication of matrices. Because of its wide use in application problems, it is important that we learn it well. Therefore, we will try to learn the process in a step by step manner. We first begin by finding a product of a row matrix and a column matrix.

We summarize matrix multiplication as follows:

In order for product AB size 12{ ital "AB"} {} to exist, the number of columns of A size 12{A} {}, must equal the number of rows of B size 12{B} {}. If matrix A size 12{A} {} is of dimension m×n size 12{m times n} {} and B size 12{B} {} of dimension n×p size 12{n times p} {}, the product will have the dimension m×p size 12{m times p} {}. Furthermore, matrix multiplication is not commutative.

In this chapter, we will be using matrices to solve linear systems. In, we will be asked to express linear systems as the matrix equation AX=B size 12{ ital "AX"=B} {}, where A size 12{A} {}, X size 12{X} {}, and B size 12{B} {} are matrices. The matrix A size 12{A} {} is called the coefficient matrix.

Systems of Linear Equations; Gauss-Jordan Method

In this section, we learn to solve systems of linear equations using a process called the Gauss-Jordan method. The process begins by first expressing the system as a matrix, and then reducing it to an equivalent system by simple row operations. The process is continued until the solution is obvious from the matrix. The matrix that represents the system is called the augmented matrix, and the arithmetic manipulation that is used to move from a system to a reduced equivalent system is called a row operation.

In the, we expressed the system of equations as AX=B size 12{ ital "AX"=B} {}, where A size 12{A} {} represented the coefficient matrix, and B size 12{B} {} the matrix of constant terms. As an augmented matrix, we write the matrix as [AB] size 12{ left [A \lline B right ]} {}. It is clear that all of the information is maintained in this matrix form, and only the letters x size 12{x} {}, y size 12{y} {} and z size 12{z} {} are missing. A student may choose to write x size 12{x} {}, y size 12{y} {} and z size 12{z} {} on top of the first three columns to help ease the transition.

Once a system is expressed as an augmented matrix, the Gauss-Jordan method reduces the system into a series of equivalent systems by employing the row operations. This row reduction continues until the system is expressed in what is called the reduced row echelon form. The reduced row echelon form of the coefficient matrix has 1's along the main diagonal and zeros elsewhere. The solution is readily obtained from this form.

The method is not much different form the algebraic operations we employed in the elimination method in the first chapter. The basic difference is that it is algorithmic in nature, and, therefore, can easily be programmed on a computer.

We will next solve a system of two equations with two unknowns, using the elimination method, and then show that the method is analogous to the Gauss-Jordan method.

Now we list the three row operations the Gauss-Jordan method employs.

One can easily see that these three row operation may make the system look different, but they do not change the solution of the system.

The first row operation states that if any two rows of a system are interchanged, the new system obtained has the same solution as the old one. Let us look at an example in two equations with two unknowns. Consider the system

x+3y=7 size 12{x+3y=7} {}

3x+4y=11 size 12{3x+4y="11"} {}

We interchange the rows, and we get,

3x+4y=11 size 12{3x+4y="11"} {}

x+3y=7 size 12{x+3y=7} {}

Clearly, this system has the same solution as the one above.

The second operation states that if a row is multiplied by any non-zero constant, the new system obtained has the same solution as the old one. Consider the above system again,

x+3y=7 size 12{x+3y=7} {}

3x+4y=11 size 12{3x+4y="11"} {}

We multiply the first row by –3, we get,

3 x 9 y = 21

3x+4y=11 size 12{3x+4y="11"} {}

Again, it is obvious that this new system has the same solution as the original.

The third row operation states that any constant multiple of one row added to another preserves the solution. Consider our system,

x+3y=7 size 12{x+3y=7} {}

3x+4y=11 size 12{3x+4y="11"} {}

If we multiply the first row by – 3, and add it to the second row, we get,

x+3y=7 size 12{x+3y=7} {}

5y=10 size 12{ - 5y= - "10"} {}

And once again, the same solution is maintained.

Now that we understand how the three row operations work, it is time to introduce the Gauss-Jordan method to solve systems of linear equations.

As mentioned earlier, the Gauss-Jordan method starts out with an augmented matrix, and by a series of row operations ends up with a matrix that is in the reduced row echelon form. A matrix is in the reduced row echelon form if the first nonzero entry in each row is a 1, and the columns containing these 1's have all other entries as zeros. The reduced row echelon form also requires that the leading entry in each row be to the right of the leading entry in the row above it, and the rows containing all zeros be moved down to the bottom.

We state the Gauss-Jordan method as follows.

Before we leave this section, we mention some terms we may need in the fourth chapter. The process of obtaining a 1 in a location, and then making all other entries zeros in that column, is called pivoting. The number that is made a 1 is called the pivot element, and the row that contains the pivot element is called the pivot row. We often multiply the pivot row by a number and add it to another row to obtain a zero in the latter. The row to which a multiple of pivot row is added is called the target row.

Systems of Linear Equations – Special Cases

Section Overview

In this section you will learn to:

  1. Determine the linear systems that have no solution.
  2. Solve the linear systems that have infinitely many solutions.

If we consider the intersection of two lines in a plane, three things can happen.

  1. The lines intersect in exactly one point. This is called an independent system.
  2. The lines are parallel, so they do not intersect. This is called an inconsistent system.
  3. The lines coincide, so they intersect at infinitely many points. This is a dependent system.

The figures below shows all three cases.

 The graph on the right depicts an independent system. The graph in the middle depicts an inconsistent system. The graph on the left depicts a dependent system.
Figure 2.1

Every system of equations has either one solution, no solution, or infinitely many solutions.

In the, we used the Gauss-Jordan method to solve systems that had exactly one solution. In this section, we will determine the systems that have no solution, and solve the systems that have infinitely many solutions.

At this stage, we are going to start using a calculator to row reduce the augmented matrix.

We summarize our discussion in the following table.

  1. If any row of the reduced row-echelon form of the matrix gives a false statement such as 0 = 1, the system is inconsistent and has no solution.
  2. If the reduced row echelon form has fewer equations than the variables and the system is consistent, then the system has an infinite number of solutions. Remember the rows that contain all zeros are dropped.
    1. If a system has an infinite number of solutions, the solution must be expressed in the parametric form.
    2. The number of arbitrary parameters equals the number of variables minus the number of equations.

Inverse Matrices

Section Overview

In this section you will learn to:

  1. Find the inverse of a matrix, if it exists.
  2. Use inverses to solve linear systems.

In this section, we will learn to find the inverse of a matrix, if it exists. Later, we will use matrix inverses to solve linear systems.

Definition of an Inverse: An n×n size 12{n times n} {} matrix has an inverse if there exists a matrix B size 12{B} {} such that AB=BA=In size 12{ ital "AB"= ital "BA"=I rSub { size 8{n} } } {}, where In size 12{I rSub { size 8{n} } } {} is an n×n size 12{n times n} {} identity matrix. The inverse of a matrix A size 12{A} {}, if it exists, is denoted by the symbol A1 size 12{A rSup { size 8{ - 1} } } {}.

What you just witnessed is no coincidence. This is the method that is often employed in finding the inverse of a matrix.

We list the steps, as follows:

Now that we know how to find the inverse of a matrix, we will use inverses to solve systems of equations. The method is analogous to solving a simple equation like the one below.

23x=4 size 12{ { {2} over {3} } x=4} {}

To solve a linear system, we first write the system in the matrix equation AX=B size 12{ ital "AX"=B} {}, where A size 12{A} {} is the coefficient matrix, X size 12{X} {} the matrix of variables, and B size 12{B} {} the matrix of constant terms. We then multiply both sides of this equation by the multiplicative inverse of the matrix A size 12{A} {}.

Consider the following example.

Once again, we remind the reader that not every system of equations can be solved by the matrix inverse method. Although the Gauss-Jordan method works for every situation, the matrix inverse method works only in cases where the inverse of the square matrix exists. In such cases the system has a unique solution.

We summarize our discussion in the following table.

  1. Write the augmented matrix [AIn] size 12{ left [ matrix { A {} # \lline {} # I rSub { size 8{n} } {} } right ]} {}.
  2. Write the augmented matrix in step 1 in reduced row echelon form.
  3. If the reduced row echelon form in 2 is [InB] size 12{ left [ matrix { I rSub { size 8{n} } {} # \lline {} # B{} } right ]} {}, then B size 12{B} {} is the inverse of A size 12{A} {}.
  4. If the left side of the row reduced echelon is not an identity matrix, the inverse does not exist.
  1. Express the system in the matrix equation AX=B size 12{ ital "AX"=B} {}.
  2. To solve the equation AX=B size 12{ ital "AX"=B} {}, we multiply on both sides by A1 size 12{A rSup { size 8{ - 1} } } {}.

Application of Matrices in Cryptography

In this section, we see a use of matrices in encoding and decoding secret messages. There are many techniques used, but we will use a method that first converts the secret message into a string of numbers by arbitrarily assigning a number to each letter of the message. Next we convert this string of numbers into a new set of numbers by multiplying the string by a square matrix of our choice that has an inverse. This new set of numbers represents the coded message. To decode the message, we take the string of coded numbers and multiply it by the inverse of the matrix to get the original string of numbers. Finally, by associating the numbers with their corresponding letters, we obtain the original message.

In this section, we will use the correspondence where the letters A to Z correspond to the numbers 1 to 26, as shown below, and a space is represented by the number 27, and all punctuation is ignored.

Table 2.2
ABCDEFGHIJKLM
12345678910111213
NOPQRSTUVWXYZ
14151617181920212223242526

Now suppose we wanted to use a 3×3 size 12{3 times 3} {} matrix to encode a message, then instead of dividing the letters into groups of two, we would divide them into groups of three.

We summarize.

Applications – Leontief Models

In the 1930's, Wassily Leontief used matrices to model economic systems. His models, often referred to as the input-output models, divide the economy into sectors where each sector produces goods and services not only for itself but also for other sectors. These sectors are dependent on each other and the total input always equals the total output. In 1973, he won the Nobel Prize in Economics for his work in this field. In this section we look at both the closed and the open models that he developed.

The Closed Model As an example of the closed model, we look at a very simple economy, where there are only three sectors: food, shelter, and clothing.

The Open Model

The open model is more realistic, as it deals with the economy where sectors of the economy not only satisfy each others needs, but they also satisfy some outside demands. In this case, the outside demands are put on by the consumer. But the basic assumption is still the same; that is, whatever is produced is consumed.

Let us again look at a very simple scenario. Suppose the economy consists of three people, the farmer F size 12{F} {}, the carpenter C size 12{C} {}, and the tailor T size 12{T} {}. A part of the farmer's production is used by all three, and the rest is used by the consumer. In the same manner, a part of the carpenter's and the tailor's production is used by all three, and rest is used by the consumer.

Let us assume that whatever the farmer produces, 20% is used by him, 15% by the carpenter, 10% by the tailor, and the consumer uses the other 40 billion dollars worth of the food. Ten percent of the carpenter's production is used by him, 25% by the farmer, 5% by the tailor, and 50 billion dollars worth by the consumer. Fifteen percent of the clothing is used by the tailor, 10% by the farmer, 5% by the carpenter, and the remaining 60 billion dollars worth by the consumer. We write the internal consumption in the following table, and express the demand as the matrix D.

Table 2.4
F size 12{F} {} producesC size 12{C} {} producesT size 12{T} {} produces
F size 12{F} {} uses.20.25.10
C size 12{C} {} uses.15.10.05
T size 12{T} {} uses.10.05.15

The consumer demand for each industry in billions of dollars is given below.

D=[405060] size 12{D= left [ matrix { "40" {} ## "50" {} ## "60" } right ]} {}

We summarize as follows:

Adapted from Applied Finite Mathematics by Rupinder Sekhon (De Anza College), originally published by OpenStax CNX (cnx.org, collection col10613), licensed under CC BY 3.0. Changes were made. License: CC-BY-3.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.