Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Linear Equations in Linear Algebra: Solving Systems and Using MATLAB, Exercises of Mathematical Methods for Numerical Analysis and Optimization

A study guide for chapter 1 of a linear algebra textbook. It covers the basics of solving systems of linear equations using elementary row operations and introduces the concept of row equivalence. The document also provides instructions on how to use matlab to perform row operations and check solutions.

Typology: Exercises

2011/2012

Uploaded on 08/03/2012

dharm
dharm 🇮🇳

4.3

(24)

65 documents

1 / 6

Toggle sidebar

Related documents


Partial preview of the text

Download Linear Equations in Linear Algebra: Solving Systems and Using MATLAB and more Exercises Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity! 1-1 As you work through this chapter and the next, your experience may resemble several walks through a village at different seasons of the year. The surroundings will be familiar, but the landscape will change. You will examine various mathematical concepts from several points of view, and a major problem will be to learn all the new terminology and the many connections between the concepts. In Chapter 4, you will see these ideas in a more abstract setting. Diligent work now wil1 make the trip through Chapter 4 just another walk through the same village. 1.1 SYSTEMS OF LINEAR EQUATIONS ______________ The fundamental concepts presented in this section and the next must be mastered for they will be used throughout the course. STUDY NOTES Please read How to Study Line ar Algebra, on the preceding two pages, before you continue. The text uses boldface type to identify important terms the first time they appear. You need to learn them; some students write selected terms on 3 × 5 cards, for review. At the end of each chapter in this Study Guide, a glossary checklist may help you learn definitions. The text defines the size of a matrix. Don’t use the term dimension, even though that appears in some computer programming languages, because in linear algebra, dimension refers to another concept (in Section 4.5). The first few examples are so simple that they could be solved by a variety of techniques. But it is important to learn the systematic method presented here, because it easily handles more complicated linear systems, and it works in all cases. The calculations in this section are based on the following important fact: When elementary row operations are applied to a linear system, the new system has exactly the same solution set. 1-2 CHAPTER 1 l Linear Equations in Linear Algebra (See the text.) The steps in the summary below will be modified slightly in Section 1.2. Summary of the Elimination Method (for This Section) 1. The first equation must contain an x1. Interchange equations, if necessary. This will create a nonzero entry in the first row, first column, of the augmented matrix. 2. Eliminate x1 terms in the other equations. That is, use replacement operations to create zeros in the first column of the matrix below the first row. 3. Obtain an x2 term in the second equation. (Interchange the second equation with one below, if needed, but don’t touch the first equation.) You may scale the second equation, if desired, to create a 1 in the second column and second row of the matrix. 4. Eliminate x2 terms in equations below the second equation, using replacement operations. 5. Continue with x3 in the third equation, x4 in the fourth equation, etc., eliminating these variables in the equations below. This will produce a “triangular” system (at least for systems in this section). 6. Check if the system in triangular form is consistent. If it is, a solution is found by starting with the last nonzero equation and working back up to the first equation. Each variable on the “diagonal” is used to eliminate the terms in that variable above it. The solution to the system becomes apparent when the system is finally transformed into “diagonal” form. 7. Check any solutions you find by substituting them into the original system. The solution set of a system of linear equations either is empty, or contains one solution, or contains infinitely many solutions. When asked to “solve” a system, you may write “incon- sistent” if the system has no solution. As you will see later, determining the number of solutions in the solution set is sometimes more important than actually computing the solution or solutions. For that reason, pay close attention to the subsection on existence and uniqueness questions. Key Exercises: 19–22 and 25. SOLUTIONS TO EXERCISES Get into the habit now of working the Practice Problems before you start the exercises. Probably, you should attempt all the Practice Problems before checking the solutions at the end of the exercise set, because once you start reading the first solution, you might tend to read on through the other solutions and spoil your chance to benefit from those problems. For brevity, the symbols R1, R2, . . ., stand for row 1 (or equation 1), row 2 (or equation 2), and so on. 1.1 l Systems of Linear Equations 1-5 A Mathematical Note: “If . . . , then . . . .” Many important facts and theorems in the text are written as implication statements, in the form “If P, then Q”, where P and Q represent complete sentences. For instance, the statement in the box at the top of page 8 has the form the augmented matrices the two systems If of two linear systems , then have the same are row equivalent solution set                   (1) An implication statement “If P, then Q” is itself true provided that statement Q is true whenever statement P is true. In mathematical terminology, we say that “P implies Q,” and we write P ⇒ Q. Be careful to distinguish between an implication statement “P implies Q” and the converse or “opposite” implication, “Q implies P”. The converse may or may not be true when the original implication is true. For instance, the converse of (1) above is not true, because there exist two linear systems with the same solution set but whose augmented matrices are not row equivalent. For example: 1 2 1 2 1 2 1 x x x x + = + = 1 2 1 2 1 2 1 2 2 2 3 3 3 x x x x x x + = + = + = MATLAB Row Operations To use MATLAB for your homework in this course, the MATLAB program must contain the data for the exercises in this text. At some schools, the campus-wide version of MATLAB already has this data available on some or all computers. (The same may be true for Maple or Mathematica.) Ask your instructor. If you plan to run MATLAB at home, you will need to download the MATLAB Laydata Toolbox from the website www.laylinalgebra.com and follow the instructions there. Data files are also available at this site for Maple, Mathematica, and the graphic calculators TI-83+/86/89 and HP-48G. Basic instructions for using these matrix programs in this course are given in appendices at the end of this Study Guide. Specific commands for MATLAB will be introduced as needed at the end of some sections. Corresponding commands for other matrix programs can be found in the appendices. While you are running MATLAB, type the command c1s1 (which stands for chapter 1 section 1) at the MATLAB prompt. If the data are not installed, you will get a message such as “Undefined function”. Otherwise, you should see a list of exercises in Section 1.1 for which data are available. Type the number of the appropriate exercise and press <Enter>. 1-6 CHAPTER 1 l Linear Equations in Linear Algebra For Section 1.1, the MATLAB data for each exercise are stored in a matrix called M. You can perform row operations on M with the following commands (which are in the Laydata Toolbox along with the data): replace(M,r,m,s) Replaces row r of matrix M by row r + m⋅row s swap(M,r,s) Interchanges rows r and s of M scale(M,r,c) Mult iplies row r of M by a nonzero scalar c (Press <Enter> after each MATLAB command, displayed in boldface type.) The name of any matrix in your MATLAB workspace can be inserted in place of M; the letters r, m, s , and c stand for any whole numbers you choose. If you enter one of these commands, say, swap(M,1,3), then the new matrix, produced from M, is stored in the matrix “ans” (for “answer"). If, instead, you type M1 = swap(M,1,3), then the answer is stored in a new matrix M1. If the next operation is M2 = replace(M1,2,5,1), then the result of changing M1 is placed in M2, and so on. The advantage of giving a new name to each new matrix is that you can easily go back a step if you don’t like what you just did to a matrix. If, instead, you type M = replace(M, 2,5,1), then the result is placed back in M and the “old” M is lost. Of course, the “reverse” operation, M = replace(M,2,–5,1) will bring back the old M. Note: For the simple problems in this section and the next, the multiple m you need in the command replace(M,r,m,s) will usually be a small integer or fraction that you can compute in your head. In general, m may not be so easy to compute mentally. The next two paragraphs describe how to handle such a case. The entry in row r and column c of a matrix M is denoted by M(r, c). If the number stored in M(r, c) is displayed with a decimal point, then the displayed value may be accurate to only about five digits. In this case, use the symbol M(r, c) instead of the displayed value in calculations. For instance, if you want to use the entry M(s, c) to change M(r, c) to 0, enter the commands m = —M(r,c)/M(s,c) The multiple of row s to be added to row r M = replace(M,r,m,s) Adds m times row s to row r Or, you can use just one command: M = replace(M,r,–M(r,c)/M(s,c),s). Finally, the command format compact wil1 eliminate extra space between displays, so you can see more data on the screen. The command format will return the screen to the normal display. Warning : Using a matrix program such as MATLAB is fun and will save you time, but make sure you can perform row operations rapidly and accurately with pencil and paper. Probably, you should work all the exercises in Section 1.1 by hand and use your matrix program only to check your work.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved