Matrices lend themselves to automation by electronic devices. Systems of linear equations, expressed in matrix form, are solved very quickly using hand-held graphing calculators or other computer applications running on various devices .
There are typically a great many individual arithmetic operations involved if the calculation is done manually but a graphing calculator or other device hides these from the user. A relatively simple matrix notation expresses certain complicated problems in a concise way that can be unravelled by the algorithms built into the machine being used.
How this is done in practice depends on the particular device. Users should consult the instruction manual for their device for specific information about inputting matrices. However, an overall understanding of the processes involved is needed as a first step.
The following is an example of a system of three linear equations in four variables. On the left of each equation is a sum of terms in which a numerical coefficient multiplies a variable that is not raised to any power other than $1$1.
$w+3x-2y-5z$w+3x−2y−5z | $=$= | $-19$−19 |
$2w+x+y-z$2w+x+y−z | $=$= | $3$3 |
$-w-x+4y+3z$−w−x+4y+3z | $=$= | $21$21 |
By a solution to this system of equations, we mean a set of particular values of $w$w, $x$x, $y$y and $z$z that satisfy all three equations.
In this case, we would expect to find that there are many such solutions. There is certainly no unique solution and it is possible that there is no solution at all. To have a unique solution, the system would need to have four equations each expressing a different relation among the variables.
The following system of four equations has a unique solution.
$w+3x-2y-5z$w+3x−2y−5z | $=$= | $-19$−19 |
$2w+x+y-z$2w+x+y−z | $=$= | $3$3 |
$-w-x+4y+3z$−w−x+4y+3z | $=$= | $21$21 |
$w+x+y+z$w+x+y+z | $=$= | $10$10 |
In matrix form, we need a $4\times4$4×4 matrix of coefficients. In your calculator, this will need a label $A,B,C,...$A,B,C,... . The convention is to identify matrices with capital letters. Similarly, the numbers on the right of the equations will form a column matrix which also needs to be entered into the calculator.
Check that the matrices given below are equivalent to the original system of equations when put into the matrix equation $AX=Y$AX=Y.
To solve the matrix equation, we will make use of the inverse $A^{-1}$A−1 of matrix $A$A. After entering the matrix $A$A into your calculator, you will need to input the command for calculating the inverse.
The following steps show how the equation will be solved.
$AX$AX | $=$= | $Y$Y |
$A^{-1}AX$A−1AX | $=$= | $A^{-1}Y$A−1Y |
$IX$IX | $=$= | $A^{-1}Y$A−1Y |
$X$X | $=$= | $A^{-1}Y$A−1Y |
This means that if we start with a matrix equation $AX=Y$AX=Y, then the solution, if it exists, is given by $X=A^{-1}Y$X=A−1Y. That is, we must multiply the column $Y$Y from the left by the inverse of matrix $A$A.
If there is no solution, your calculator will give an error message when you attempt to find the inverse of matrix $A$A. It may inform you that $A$A is singular or not invertible.
The inverse of matrix $A$A is shown below, together with the required matrix multiplication and the solution to the original system of equations.
We see that the solution is $w=1,x=2,y=3,z=4$w=1,x=2,y=3,z=4.
In the case of the system of three equations in four unknowns that we began with, we need to perform a sequence of row operations in order to obtain information about the solution set. (There are infinitely many solutions but they are restricted to a particular $1$1-dimensional subspace of the $4$4-dimensional space defined by the variables.)
Details and some explanation about carrying out row operations are shown in another chapter.
The matrix equation we wish to investigate is
We write it in the form of a tableau and carry out the indicated operations. There are procedures for this specific to your particular model of calculator. This example was created using an Excel spreadsheet.
The final rows of this process show that
$w$w | $=$= | $1$1 |
$x-1.4z$x−1.4z | $=$= | $-3.6$−3.6 |
$y+0.4z$y+0.4z | $=$= | $4.6$4.6 |
In matrix form, this general solution can be written
We only need to choose a value for the parameter $t$t to obtain a particular solution. Observe what happens when $t=4$t=4.
With the power of a graphics calculator, we can quickly use the above method to find a solution to a system of equations. This is achieved by entering the matrices directly into the calculator, then getting the calculator to performing the matrix inversion and multiplication.
$w+3x-2y-5z$w+3x−2y−5z | $=$= | $-19$−19 |
$2w+x+y-z$2w+x+y−z | $=$= | $3$3 |
$-w-x+4y+3z$−w−x+4y+3z | $=$= | $21$21 |
$w+x+y+z$w+x+y+z | $=$= | $10$10 |
Above is the same system of linear equations we solved earlier in this lesson. Now we are going to solve them again, with the help of the Texas Instrument TI-Nspire CAS Calculator. However, this method will be very similar for any graphics calculator model you are currently using.
In the Calculator section of your graphics calculator, you need to enter a matrix. On this calculator, there is a button that allows you to enter a matrix with a chosen no. of columns and rows.
Remember we previously defined a $4\times4$4×4 co-efficient matrix, which we labelled as $A$A. We now want to enter this matrix into the calculator, so we will first create a matrix with 4 rows and 4 columns.
Once we have entered all the elements of the matrix into the calculator, we now want to store this matrix into the calculator, by pressing CTRL then STO->. You can then choose a letter to represent your matrix. In the picture above, we have chosen the letter $A$A. Press ENTER and this matrix will now be stored in the calculator.
We also need to add matrix $B$B, which is the $4\times1$4×1 column matrix from before, that represented what each of the four equations are equal to. You do this using the exact same method.
Once both matrices are entered into the calculator, we can use the formula $X=A^{-1}B$X=A−1B from before, to find the $4\times1$4×1 solution matrix $X$X.
Enter the formula as above into your calculator and press ENTER. The calculator will then give you the solution to this system of equations.
The column matrix shown above provides the unique solution to this system of equations, as found before, which is $w=1$w=1, $x=2$x=2, $y=3$y=3 and $z=4$z=4.
Use a graphing calculator to find the inverse of the matrix
$A$A$=$= |
|
Round all entries to six decimal places.
$A^{-1}$A−1 | $=$= |
|
Use a graphing calculator to find the inverse of the matrix
$A$A$=$= |
|
. |
Give all entries to six decimal places.
$A^{-1}$A−1 | $=$= |
|