Skip to content
Textbook Guides

Solution Manual For Linear Algebra Plus Mymathlab Getting Started Kit For Linear Algebra And Its Applications, 4th Edition

With Solution Manual For Linear Algebra Plus Mymathlab Getting Started Kit For Linear Algebra And Its Applications, 4th Edition, you can tackle your textbook assignments with confidence, knowing you have the correct answers.

Preview 16 of 1083 pages

See the first 16 pages exactly as they appear in the document.

  1. Page 1
    Read page 1 as text

    M AT L AB ® M ANUAL J EREMY R. C ASE Taylor University J ANE D AY San Jose State University L INEAR A LGEBRA AND I TS A PPLICATIONS F OURTH E DITION David C. Lay University of Maryland

  2. Page 2
  3. Page 3
    Read page 3 as text

    iii Contents 1 Getting Started . .................................................. 1 Prepare . ............................................................................................ 1 Obtain an Educational License . ....................................................... 1 Order Student MATLAB and Study Guides Early . ......................... 1 Install Laydata4 Toolbox Before Classes Start . ............................... 1 Obtain Data for Case Studies and Application Projects . ................. 2 Prepare Student Computer Lab Instructions . .................................. 2 2 Planning the Course . ......................................... 2 Allow Time for Planning and Adjusting Plans . ............................... 2 Consider Purposes for Computer Assignments . .............................. 3 Decide Emphasis on Computer Work. ............................................. 4 Design Computer Assignments . ...................................................... 4 Anticipate Commons Difficulties . ................................................... 5 Consider Classroom Demonstrations . .............................................. 5 Decide How You Will Test Students . .............................................. 6 Be Creative. ...................................................................................... 7 3 Using Software for Demonstrations . ................ 8 4 Downloading M-Files from the Web . ............... 9 5 Computer Projects . .......................................... 10 General Information . ...................................................................... 10 Partners . ......................................................................................... 10 Notes about the Individual Projects . .............................................. 10 6 Overview of the Case Studies/Applications ... 14 Case Studies . .................................................................................. 14 Application Projects . ...................................................................... 14 7 References. ........................................................ 16 Sample Computer Projects

  4. Page 4
    Read page 4 as text

    Getting Started 1 1. Getting Started PREPARE This manual assumes that you will be using MATLAB, but there are other excellent software packages or calculators you could use. Maple and Mathematica are examples of other mathematical software packages conducive to linear algebra. Calculators with matrix capabilities such as those made by Hewlett Packard and Texas Instruments are other possibilities. Each of the technologies listed here has a manual to accompany Lay’s book and is available from Addison-Wesley. The exercises in Lay’s text are written so that any appropriate software or calculator may be used. This manual assumes that in addition to MATLAB you will use Laydata4 Toolbox, which is a collection of M-files that can be downloaded from MyMathLab or accessed through pearsonhighered.com/lay . These M-files will need to be made accessible to your students. It is also a good idea to use the Study Guide, a supplement to the text, to accompany this manual. The text, the Study Guide, and Laydata4 Toolbox are highly coordinated to work together. For the students, the Study Guide is the primary support for the use of technology during the semester. In addition to the MATLAB boxes at the ends of many sections, the Appendix, “Getting Started with MATLAB,” provides the initial information students may need to use MATLAB effectively. Furthermore, there are appendices for other technologies such as Maple, Mathematica, and several graphing calculators. For the instructor, your job will be much easier if you and your students have the Study Guide with its wealth of information. If you have not used MATLAB extensively before, spend some time learning the basic operations before you begin class. MATLAB and linear algebra work very well together, and you can do some interesting things fairly quickly. You might work through the first project, “Getting Started with MATLAB,” and then try some other projects. Exercises designated by an [M] in Lay’s text are designed to be worked with the aid of technology, and you might try some of these problems. Read the MATLAB boxes in the Study Guide to see how MATLAB could be used on homework problems. One of the Study Guide ’s features is that it gradually introduces MATLAB commands as they are needed. Alternatively, you could become introduced to MATLAB by working through a tutorial in a book or on the Web. As you become more familiar with MATLAB’s capabilities, attempt more involved problems such as the case studies and application projects available from the course website. These are usually found at the beginning of most chapters, and an icon in the text references the course website for these resources. OBTAIN AN EDUCATIONAL LICENSE Usually the most cost effective way to provide MATLAB to students is for your school to buy an educational site license. You can use any version of MATLAB for Lay’s [M] exercises and for most of the projects. ORDER STUDENT MATLAB AND STUDY GUIDES EARLY Ask your bookstore to stock Lay’s Study Guide with the textbook. Our institution has an educational site license for MATLAB, but if yours does not, request that the Student Edition of MATLAB [10] be made available as well. The latest edition of Student MATLAB is usually what they will get. Some students may have access to earlier editions, and those will work fine. Student MATLAB costs about $100 and includes a good User's Guide . It is identical to professional MATLAB except in a few ways that rarely affect students' use. INSTALL LAYDATA4 TOOLBOX BEFORE CLASSES START The M-files in Laydata4 Toolbox are not part of commercial MATLAB, so you must install them on the computers your students will use. If students plan to use MATLAB on their personal computers, they must also install the M- files. See Section 4 below and Section 15 of the preliminary Computer Project “Getting Started With MATLAB.” If there is an earlier Toolbox from Lay’s text such as Laydata Toolbox, you will need to delete this Toolbox so that students download the correct data.

  5. Page 5
    Read page 5 as text

    2 Planning the Course You should check the status of your software and M-files before each term begins. One year, our institution changed operating systems between semesters. What had worked one month previously no longer worked, and I spent the first week scrambling to correct it. It got the class off on the wrong foot, and it took longer for them to feel comfortable with the technology. It taught me to never take for granted what will work as computers are upgraded. The files in Laydata4 Toolbox provide the data for about 850 exercises in Lay's text, as well as the data for the individual projects printed at the back of this manual. Having the data for all numerical exercises readily available saves the tedium of typing it in and ensures that students work with the intended numbers. Laydata4 Toolbox also contains some special MATLAB functions that enhance the teaching of linear algebra from Lay’s text. These functions are described in Section 3 below, as well as in the Study Guide and in the projects as they are needed. OBTAIN DATA FOR CASE STUDIES AND APPLICATION PROJECTS In addition to the hard copy projects at the end of this manual, there are Case Studies and Application Projects available from the Web. The Case Studies expand topics introduced at the beginning of each chapter in Lay’s textbook and use real-world data. The Application Projects either extend existing topics in the text or introduce new applications. The Data files for the Case Studies and Application Projects are contained in text files on the Web at pearsonhighered.com/lay . If you decide to assign one or more of these projects that has accompanying data, then either you or your students must download the appropriate files from the Web and add them to the MATLAB path. See Section 4 below. PREPARE STUDENT COMPUTER LAB INSTRUCTIONS On the first day of classes, students need information about how you plan to use MATLAB in the course and how they can access the program and appropriate data. List the Study Guide as the “lab manual” for the course. With the Study Guide in hand , students rarely will need more documentation for the course other than MATLAB’s help command and your local computer procedures. You can prepare a sheet to hand out, or put the information on a web page, or do both. Here are some facts that students may need: • Location of campus computer lab facilities. • Hours and days when the labs are available for student use. • How to obtain and use computer log-on names and passwords. • How to start MATLAB in the lab, print output, and save the work. • Where to get help. • How to get a personal copy of MATLAB and data for the course. 2. Planning the Course ALLOW TIME FOR PLANNING AND ADJUSTING PLANS It would be very good to have some release time the first time you try using a significant number of computer exercises. However, some institutions like mine cannot always provide such release time. Pressed for time, I found the projects in this manual to be very helpful the first time I taught linear algebra. Starting out or making major changes in a course takes a lot of effort, and computers introduce another dimension for what can go wrong. I started slowly by using computer exercises as an “add on” to the traditional course. I think this is not an unwise way to begin. As you understand the technology and the students better, you can change the style and topics of your course. Students will have various interests and questions, and you should allow yourself some flexibility in modifying your course.

  6. Page 6
    Read page 6 as text

    Planning the Course 3 CONSIDER PURPOSES FOR COMPUTER ASSIGNMENTS As you consider your students' interests and begin to appreciate the potential of computer exercises, decide what purposes are most appropriate for your class. Here are some possible ones: 1. To teach applications 2. To reinforce understanding of concepts and theory 3. To think and problem solve 4. To explore and conjecture 5. To develop some computational wisdom 6. To learn something new 7. To reduce tedious hand calculation 8. To practice routine calculations 9. To write programs to solve problems, learn algorithms, etc. 10. To introduce MATLAB for later courses The first four purposes listed are the most important to me, but all of these reasons have merit and are addressed in various projects. Applications provide motivation as to why one should learn the material. For many of my students, they seem more likely to forget material that they do not find interesting or that they cannot conceive of applying it in the future. You can expose your students to a variety of applications using the case studies in the book. Such examples are natural topics for computer exercises because applications are more interesting when the data are not trivial. The second goal is very important. People tend to misuse theory when they do not understand it, so you might stress the mastery of the big ideas such as linear independence, span, basis, dimension, eigenvalues and orthogonality. I believe students should also understand why the major theorems are true. However, many of my students do not appreciate the abstract concepts as much as I do, and it helps if they connect the concepts to ideas they already know. Practicing the ideas in concrete calculations and applications also solidifies the ideas. Furthermore, if they can be convinced that the theorems and ideas are reasonable and useful, they are more motivated. Computer exercises are an attractive device towards this end. It gets them to grapple with some theory, and some of the projects explicitly address abstract ideas. All projects ask students to explain what they have seen, and most points should be placed on those questions. I consider the third and fourth purposes part of the broader scheme of mathematics. I will then add some questions to the projects asking students to extend the results. These are sometimes difficult to grade particularly if you have a large class. Hence, while I did not modify the projects to include these questions in this manual, I encourage you to adapt the projects toward your goals. One of the original authors of this manual, Jane Day, stressed the development of computational wisdom. Numerical issues and peculiarities come up in several of the projects, including "Reduced Echelon Form and ref " and "Roundoff Error in Matrix Computations." While not undermining the faith in good software, she wanted her students to learn to be wise and cautious. To her students she emphasized the following, in this order: 1. Professionally written matrix software gives good answers to most problems, but there is almost always some error. 2. The matrix algorithms that work well on computers are more sophisticated than those presented in basic linear algebra texts. So people should employ professionally written software in their jobs. 3. Some problems are inherently difficult to solve accurately even with the best algorithms. So users should never ignore warnings from professional software. For students who want to know more, there are several well-written contemporary introductions to numerical linear algebra. George Forsythe's paper [4] is a classic. It is remarkable how clearly he articulated the inevitable pitfalls of floating point matrix computations so early.

  7. Page 7
    Read page 7 as text

    4 Planning the Course DECIDE EMPHASIS ON COMPUTER WORK Computer projects are good vehicles for introducing simple applications, which are important for the majority of our students. One important reason for having linear algebra students work with professional software like MATLAB is that they need to know such software exists. In the workplace, they will be using professional software that will be far faster and more accurate than code based on algorithms alone. At the same time, I feel it is important for them to learn the basic algorithms of linear algebra because those enhance understanding of concepts. Some instructors organize the computer work around weekly lists of five or more [M] exercises from the text. Other instructors include one or more [M] exercises in nearly every night’s homework. Here the point is to encourage daily use of MATLAB for most of the numerical exercises, not just those marked with [M]. Remember that Laydata4 Toolbox provides data for most exercises in the text so the time entering data on the computer is minimal. One obvious factor in determining how much to emphasize computer work is the availability of a computer lab. Currently, my institution does not have the space available for a weekly lab so most of the computer work is done outside of class. I believe I would change my approach if the students could use the computer during class time rather than just me using the computer at the front of the room. How much you will emphasize computer assignments, applications, and theory depends on your personal situation. Your teaching style, your course objectives, and the specific needs at your school are all factors that must be given consideration. I suggest you look at book [2] which greatly helped me to become aware of issues I had not previously considered and to navigate these issues for myself. DESIGN COMPUTER ASSIGNMENTS The first time you use computer assignments, you should probably proceed with some caution. Evaluate the effectiveness and difficulty of each assignment before making another. Various details can require more attention than you might expect, especially at the beginning of the semester. For instance, you may find that access to the computer labs is inadequate, or a student who buys software has trouble installing it. Equipment has a way of breaking down when you need it most. It would be wise to assume "If it can go wrong, it will" and then be pleasantly surprised if things go smoothly. On the other hand, technology is so ubiquitous that I am finding fewer and fewer problems each year. (It could also be that I know now by experience which IT person to contact.) It is important to give an easy computer assignment early and collect it to get students started and to help you evaluate how they react to computer use. I suggest you ask them to work through "Getting Started" during the first few days. It will be good for them to know what topics are discussed there even if they don't understand all the matrix operations at first. You could then demonstrate the functions replace , swap and scale , and assign "Practice Row Reduction." After they succeed with that project, assign a few [M] exercises from the first sections of the text. Work each computer problem yourself before assigning it. You will then know how this experience will fit with your classroom lessons, what students should watch out for, how much time to allow, and how much other homework is reasonable to assign. Most of the projects are straightforward – students have to read some, and spend some time doing the calculations, but hard thinking is required only occasionally. Emphasize that the questions that ask for interpretation of what they calculate are the ones that really matter, and that's where most of the points are. In recent semesters, I have used 10 core projects, and then assigned a few more specific to the students’ needs and interests. For example, the education majors were assigned the Cryptography project while those interested in business were given the project “An Economy with an Open Sector.” Others require about 14 projects and let students select 2 or 3 more for extra credit, which seems a reasonable way to address the variety of student interests. It is a good idea to discuss each project briefly before assigning it and again when handing the papers back to be sure everyone got the point. A very real danger in computer projects is that students push the buttons and miss the obvious points in understanding. The projects here are written like lab forms and from my experience are pretty easy to grade. Student graders, if available, can be used to grade the projects to save you time.

  8. Page 8
    Read page 8 as text

    Planning the Course 5 I encourage students to work in groups. I am almost convinced that students do better with technology when they have to figure it out for themselves rather than when it is explained to them. Furthermore, there are the MATLAB boxes and the MATLAB Appendix in the Study Guide for them to use as a resource. Since it is unlikely that someone will always be there to provide an explanation as newer technologies and upgrades are introduced, figuring out technology on your own seems to be an important skill to develop. Working in groups eases this struggle, but I still am available for consultation—particularly for the shy student who has some aversion to computers. Sometimes students use MATLAB to check their answers to the textbook problems, but most of the time my students just use their calculators. Since one of the emphases in my class is theory, I collect homework that requires explanations or proof rather than routine problems. However, the routine problems and computer projects help build that understanding so that the theory is not developed in a “vacuum.” ANTICIPATE COMMON DIFFICULTIES Most students today are very computer literate. However there are still a few techno-phobes in every class. Their problems are primarily not with MATLAB, but rather with the interface between it and the outside environment, such as saving, editing and printing files. These projects were designed to minimize these issues because these activities do not enhance linear algebra much. Students could even record a few results by hand and print a graph occasionally. The projects are much easier to grade than they used to be when students used the diary command all the time and turned in huge stacks of paper. If, for example, you prefer to have your students turn in their projects electronically either by email or by a web course management system, you will have to think through how you want your students to submit their solutions. Editing documents created through the diary command is much easier today due to the interactive capabilities of most computers. Still, your students will need guidelines so that the problems that arise are related to the material and not the word processing. CONSIDER CLASSROOM DEMONSTRATIONS Most schools have permanent or portable demonstration units in the classroom consisting of a computer and a multimedia projector. The portable ones have the inconvenience of setting them up and down before class, but they do work. For linear algebra purposes, a color display is desirable because of the demonstrations related to graphics. While it is very difficult at our institution to reserve a computer lab on a regular basis, I can use such a projection unit with a computer and a camera on a calculator for classroom demonstrations. This has benefited my classes so much that I resent being assigned a classroom with just a chalkboard for my other courses. If I understand the educational research correctly, students learn much more by seeing the material in a variety of contexts. I sometimes give students “control” of the computer to break up the routine in class. They often can calculate faster than me, and the class occasionally comes up with new insights since the method of using MATLAB is slightly different. One way classroom demonstrations can be used is to check on student learning. For example, if the students appear to understand a particular problem and its expected numerical results, students can witness an instant calculation to see if that corresponds to their understanding. The class can also make conjectures, and those claims can be put to the test rather quickly using technology. An aid to this end is the collection of special MATLAB functions that comes with Laydata4 Toolbox. See the Study Guide and Section 3 on page 8 below for further descriptions of the special functions. If the computer is used appropriately, the material becomes more convincing and richer. The likelihood of getting bogged down in the arithmetic increases the chances that students miss the larger, fuller picture. Using MATLAB allows me to focus on the concepts and ideas that I want to stress. For example, I can ask what should be calculated to verify that the answer is correct, and then use MATLAB to do that calculation. This process can be a much better use of class time for helping students grasp the material rather than working out a tedious solution by hand. This process of analysis , prediction , computer solution , and verification is how professional scientists use computers, and these are important skills for students to practice.

  9. Page 9
    Read page 9 as text

    6 Planning the Course DECIDE HOW YOU WILL TEST STUDENTS How students should be assessed on exams is always a critical issue for an instructor. One major consideration is whether to allow MATLAB on exams. If MATLAB is unavailable, you will need to decide if graphing calculators will be permitted. You obviously will have to consider the profiles of your students and the test conditions. My approach is that students should primarily be tested on conceptual ideas rather than computations. There are other settings, such as homework, where computational skills can be assessed. I allow TI-84 and TI-89 graphing calculators on tests because the use of MATLAB for me is not practical. I still try to minimize the need for a calculator unless I give an untimed test or I link the data directly to their calculators. (I do not allow other hand held devices although connectivity to the “outside world” will increasingly become an interesting and challenging issue.) As far as the type of questions to include on an exam, I like test questions that can be quickly done if one takes the appropriate perspective and thinks about the issues involved. I also value questions that require the synthesis of a variety of ideas and topics. When working on your exams, consider the text website which has many sample tests and review sheets for three different types of courses. You might choose to tell your students which types of questions on those exams are similar to the ones you sometimes create. Consider including on exams a question or two based on projects that the students have completed. Such questions can be effective in reinforcing the objectives of the assignment and in determining which members of the group actually participated in the project. The following sample questions are examples where computers were used during instruction but not on the test. 1. The following matrices are row equivalent: 1 2 3 2 1 2 0 8 2 4 5 6 A − − ⎡ ⎤ ⎢ ⎥ = − − ⎢ ⎥ ⎢ ⎥ − − ⎣ ⎦ , 1 2 0 8 0 0 1 2 0 0 0 0 R − ⎡ ⎤ ⎢ ⎥ = − ⎢ ⎥ ⎢ ⎥ ⎣ ⎦ . Write the general solution to A = x 0 . Write a particular solution to A = x 0 . Consider the matrix transformation A → x x ; is it 1-1? onto? Explain answers. Find a basis for the column space of A and a basis for the null space of A . 2. There is a real 3 3 × matrix A for which the general solution of some system A = x b is 3 3 1 4 2 1 0 x ⎡ ⎤ ⎡ ⎤ ⎢ ⎥ ⎢ ⎥ = + − ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎣ ⎦ ⎣ ⎦ x . What is the general solution of A = x 0 ? 3. A certain population of owls feeds almost exclusively on wood rats. Letting ( ) o k and ( ) r k denote the number in each population in year k , a biologist estimates that ( 1) .5 ( ) .05 ( ) o k o k r k + = + and ( 1) .9 ( ) 50 ( ) r k o k r k + = − + . Write the matrix that describes the interaction of these two populations from year k to year k+1 . Assume the pattern described will continue in the future. Don't calculate, but instead answer in words: (a) What would you calculate, and how would you interpret the results, to find out the number of individuals in each population five years from now? (b) How could you use eigenvalues and eigenvectors to describe the long term behavior of the owl and rat populations? Include any equations you need to discuss, and say what all your symbols mean. 4. Consider the vectors v 1 = (1,1,1,1), v 2 = (2,1,0,-3), and v 3 = (-1,2,0,0). (a) Which pairs of these vectors are orthogonal to each other? Show work. (b) Write the formulas for additional calculations which could be done to get an orthonornal basis for the subspace spanned by { v 1 , v 2 , v 3 }. If you have time, complete the calculations for extra credit.

  10. Page 10
    Read page 10 as text

    Planning the Course 7 5. Let A be the n n × matrix in which each entry is 1. Justify your answers to the following questions. For (a)- (c), think, don’t calculate! A very little calculation will be needed for (d). (a) There are two distinct eigenvalues of A . What are they? (b) What is dim(Nul( A ))? (c) What is the characteristic polynomial of A ? (d) What is a basis for each eigenspace of A ? 6. Suppose A is an invertible matrix, and x is an eigenvector of A . (a) Which of the following matrices also have x as an eigenvector? Circle the ones that do: 1 A − T A 2 A 3 A 3 A A + (b) Choose one of those you circled in part (a) and justify it. For instance, if you circled 2 A , you must show that if x is an eigenvector of A then it is also an eigenvector of 2 A . 7. Let A be an n n × matrix. In each part below, circle the one best possible expression to complete the sentence truthfully. Only that one best choice will be counted correct: (a) Suppose A has four distinct eigenvalues. Then A (will) (will not) (could but doesn’t have to) have four independent eigenvectors. (b) If A has zero as an eigenvalue, the eigenspace of zero (will) (will not) (could but doesn’t have to) equal Nul( A ). (c) Suppose 2 A is the n n × zero matrix. Then A (will) (will not) (could but doesn’t have to) be the zero matrix. BE CREATIVE The very existence of powerful and accessible matrix utilities raises questions about what topics to emphasize, what skills students need to learn, and what style of teaching is best. These issues are not easily resolved. Many have been influenced by the constructivist theory that students learn best when making connections to what they already know or what they want to know. As mentioned before, I have used certain projects for certain majors and had them expand on those ideas by having them develop an education lesson plan or by writing a report after doing some independent reading. Each year I try to use more group work in my courses so that students feel more involved in the course. I encourage my students to study and to work on problems together, and I think working together lowers the frustration level with regards to computers. I encourage you to discuss what is happening in other departments and disciplines at your institution. Also make use of instructors at other schools. My discussions with other colleagues have allowed me to understand better what other faculty are trying to accomplish and to be exposed to the educational issues and curriculum developments in other disciplines. Linear algebra has many uses, and you might gain some interesting and motivating problems from others at your school or from your community as a service-learning project. At the same time, communicate what you are doing to allow them to appreciate your subject matter.

  11. Page 11
    Read page 11 as text

    8 Planning the Course 3. Using Software for Demonstrations Most of the M-files in Laydata4 Toolbox simply contain data for exercises and projects, and this can be helpful for demonstrations as discussed on page 5. In addition, there are a few files that are called the “special functions,” which do particular kinds of calculations or graphing. They were written for various exercises and projects but they can also be effective for occasional demonstrations. I encourage you to experiment with them early so you’ll know about them when an occasion arises where they might be helpful. Here is a list of these special functions with a few comments: Special Function Description replace, swap, scale Single row operations gauss, bgauss Sweep out specified columns nulbasis Produces a basis for the null space proj Orthogonal projection of vector onto a subspace gs Performs Gram-Schmidt algorithm qrbasic Basic QR method for calculating eigenvalues qrshift QR method with shifts and deflation The five functions below produce simple but effective graphics. seesum, seeprod, seecom Visualize vector arithmetic drawpoly Draw polygons singvec Search visually for singular vectors The function randomint allows you to specify size and rank, and is very useful for generating quick, clear examples. The command randomint(5,4,2) will create a 5 4 × matrix of rank 2. randomint Create random integer matrices The simple way to find out how to use any MATLAB function is with help . For example, at the MATLAB prompt, type help replace or help seesum . Although all these special functions are very nice, at some point emphasize that they were developed for educational purposes and should not be used for professional applications. If such a need arises, they should use professionally written software that employs the most sophisticated and efficient algorithms known. For example, in MATLAB one should use MATLAB's backslash to solve linear systems, not ref . The latter does not check for condition number, and its algorithm is not the most efficient. Usually it produces accurate answers, but when a matrix is nearly singular, ref can return the wrong reduced form, and the user will not be warned. See the project “Roundoff Error in Matrix Calculations” for more details. Similarly, one should use MATLAB's qr function, not the special function gs in any professional setting where an orthonormal basis is needed. The function gs was written to help students learn the Gram-Schmidt algorithm, and it works fine on a small set of vectors.

  12. Page 12
    Read page 12 as text

    Downloading M-files 9 4. Downloading M-files from the Web To get Laydata4 Toolbox files, go to www.pearsonhighered.com/lay Follow the on-screen directions to obtain the version of Lay’s files you want. If you have used a Toolbox from an earlier edition of the book, you will want to delete the folder. In earlier editions of the text, the Toolbox was named Laydata and will likely be found in the main MATLAB folder. Once you have the files, you will want to decompress them and make them accessible to the working path so that MATLAB knows where to find them. To avoid having to type a possibly complicated path to the correct folder, create an empty folder name laydata4 inside the main MATLAB folder. It is a good idea to use lowercase letters since MATLAB is case sensitive. For example, on a PC the file should be created in c:\matlab\ (or whatever your working MATLAB path is). With the folder already named, navigation is easier as you move through the directory tree and decompress the downloaded files into the appropriate folder. If your access to MATLAB is through a network, ask your network administrator to install Laydata4 Toolbox and any other scripts or M-files you need so that they are accessible. If Laydata4 Toolbox or other M-files are saved someplace else, you can use the Set Path feature in MATLAB. • In MATLAB 6 and 7, select Set Path from the File menu. Click on Add with Subfolders and find the folder name of the Laydata4 subdirectory. Highlight the folder and click on OK. Finally, click on Save and Close . • If you are running MATLAB on a network, you should ask the system administrator to store Laydata4 Toolbox to MATLAB’s path. For more details, see Section 15 of the preliminary Computer Project, “Getting Started with MATLAB” and the MATLAB appendix in the Study Guide.

  13. Page 13
    Read page 13 as text

    10 Computer Projects 5. Computer Projects GENERAL INFORMATION The projects are intended to enrich and expand the material in Lay's text. They are independent of each other. Each one begins by stating a purpose, the prerequisite sections from text, and the MATLAB functions used. On the line listing the MATLAB functions, the commands inherent to MATLAB are listed first and are followed by a semicolon. The functions and data files from Laydata4 Toolbox follow the semicolon. You may copy and use the projects as written or adapt them. Most projects should require 1-2 hours, and a few may take longer. They do not require very hard thinking (except for an occasional extra credit question, and the project "Subspaces"). The MATLAB commands are given, so the time required depends mostly on how much independent reading students must do. Their work will go faster if you lecture a little on the material before they begin a project, but any of these can be "read and do" assignments. I allow about a week for each project. You may want to be lenient with your deadlines as equipment misbehaves, networks go down, and students have more difficulty with a project than you expected. PARTNERS I encourage but do not require students to do their computer work with a partner. This helps the students work through some of the computer issues together and cuts down on computer frustration. It also reduces my grading. Most of my classes do well in pairing up, but some students need help finding a partner even after the first couple of weeks. Before assigning the lab it is a good idea to present some ground rules. For example, both people should work on the lab and understand the solutions. Their signature on their paper indicates that both did the work and that both agree to the work submitted. I suggest you follow up the computer assignment after it has been submitted to confirm the signatures and to discuss briefly the objectives. One colleague of mine picks one group to present their solution to the rest of the class. NOTES ABOUT THE INDIVIDUAL PROJECTS Here are a few comments about each project. The symbol R means the project is especially recommended because of its value. I usually grade each project out of 10 points and am generally more lenient with my grading than on other homework. Getting Started With MATLAB . This is long and it is not necessary to do it all, but it can be helpful for novices and for reference. R Practice Row Reduction (5). This is easy and could be assigned soon after students have learned to do row operations by hand. They will practice doing them with Lay's functions replace , scale , and swap . Exchange Economy and Homogeneous Systems (5). Students seem to like economic models. Assign this one immediately after covering homogeneous systems in Section 1.6, and perhaps letting them read about Leontief models by themselves. The last two questions provoke them to think about row operations abstractly. For the extra credit question, consider giving one point if a student works out a symbolic example with three rows and columns say, but no points if they give only numerical examples. A nice general argument could be worth 2-3 points.

  14. Page 14
    Read page 14 as text

    Computer Projects 11 Reduced Echelon Form and ref (5). This is easy and shows students how to row-reduce a matrix using gauss and ref . They also see that roundoff error can cause ref to produce the wrong answer, by experimenting with different values for the tolerance in ref . Although the command ref can be introduced as early as Section 1.2, the text emphasizes echelon form rather than reduced echelon form until Section 1.5. The Study Guide uses gauss , swap , and scale for row operations until Section 4.3 (and 2.9). Rank and Linear Independence (5). This project can be used to introduce rank earlier than the text does. The last question here is an "explore and conjecture" type. (Section 1.7 is the prerequisite section.) R Visualizing Linear Transformations of the Plane (5). This looks long but much of it goes quickly. It uses drawpoly for some graphics, and helps students start thinking about a matrix as a transformation early. Most students seem to have very little geometric intuition and need all the practice they can get to develop some. (Section 1.9) Population Migration (5). Students like this, especially the plotting. Before assigning this one and going over the city-suburb example in the text, you might ask your students what will happen if this pattern of migration persists. Will everyone move to the suburbs? Have them calculate k x for some large values of k and report back at the next class. (Section 1.10) R Elementary Analysis of the Spotted Owl Population (5). This one does not need as much introduction, but students should read the simple example at the start of Chapter 5. Mention that they will do a naive analysis of the population’s long term behavior in this project and later will use eigenvalues and vectors to analyze it more deeply in “Using Eigenvalues to Study Spotted Owls.” (Section 1.10) Lower Triangular Matrices (5). This is a simple but nice exploration of matrix multiplication. Students will discover that the product of (unit) lower triangular matrices is (unit) lower triangular, and write proofs. (Section 2.1) The Adjacency Matrix of a Graph (10). This is a more sophisticated look at matrix multiplication. Students examine very carefully how an entry of 2 A is calculated. They must also create a definition, which is a new kind of exercise for most of them. Before assigning this project, I recommend you discuss graphs a little and explain "contact level k ." The answers for question 4(b) are "All but W8" and "All." A good answer to 4(d) would be "Dangerous means highest level one contact, and W6, W4 and W1 are most dangerous." Occasionally an observant student will see that W6 is in level two contact with everyone else and is the only worker like that. Consider giving 2 extra credit points for that answer, and report the insight to the class when handing the papers back. It never fails to cause a stir, and it motivates the others to pay more attention to details. Students' definitions in 4(d) are often vague, like "high contact level" and perhaps take off 1-2 points but try to help them say what they really wanted the definition to be, based on their explanations at the end. (Section 2.1) R Cryptography (5-10). Many students like this one---particularly the education majors. They use MATLAB’s remainder function rem to do some arithmetic modulo 26. In the extra credit question they calculate by hand a matrix inverse modulo 26. This project was originally created by a student, Sanja Petrovic. (Section 2.2) Using Backslash to Solve A x = b (5). The purpose is to see why the backslash operator is preferable to solving matrix equations when A is invertible. Students compare solutions of equations involving the ill-conditioned Hilbert matrices using the backslash command, the matrix inverse command inv , and the ref command. (Section 2.3)

  15. Page 15
    Read page 15 as text

    12 Computer Projects R Roundoff Error in Matrix Calculations (5). Students use backslash, ref and inv to solve 8 linear systems three different ways. They see that the different algorithms give somewhat different answers in every case and very different answers for the poorly conditioned systems. They see definitions of floating point notation, residual vector, condition, and Hilbert matrix; learn to watch for warnings; and use norm . There are brief discussions of condition number and the algorithms used in the three methods. The illustrated computational realities are important since many students will do matrix calculations in scientific applications. (Section 2.3) Partitioned Matrices (5). This is an important topic, as partitioned matrices are used frequently in applications. Question 2 is designed to reinforce the fact that [ ] ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ Y X B A equals A X BY + , not XA YB + . Invariably, one or two people make that mistake. What leads them astray is the definition of A x earlier in the text where the scalars i x are written on the left of the columns. To try to forestall this common error with partitioned matrices, when defining A x , point out that the i x ’s are scalars so they look more natural on the left of a vector, but technically a scalar could be written on the left or right. However, when we learn to multiply two matrices, we’ll see that the order makes a big difference, and one has to be especially careful when multiplying partitioned matrices. (Section 2.4) Schur Complement (5). This is a nice application of partitioning. Students learn three ways to calculate a Schur complement, including using row operations. The extra credit question is challenging. (Section 2.4) LU Factorization (5). This explains how the LU factorization algorithm in Section 2.5 differs from MATLAB's lu function, and provides practice using both. (Section 2.5) An Economy With An Open Sector (5). Students will verify Theorem 11 in Section 2.6 and then experiment to see that the result can fail if they change just one entry of the consumption matrix C enough. They will probably discover that increasing 11 c to about .95 will cause the solution of 1 C = + x x d to have some negative entries. They should give something like the following explanation: if the Chemicals sector consumes .95 of its own output then it is not surprising that the economy cannot meet the demands from other sectors, and this is what the nonsense solution says. Matrix Inverses and Infinite Series (5). This explores the meaning of Theorem 13 in Section 2.6. Students will experiment with the series 2 I S S + + + … finding matrices S for which it does and does not seem to converge. They could do this project any time after Section 2.2 as a "read and do" assignment. Homogeneous Coordinates for Computer Graphics (5). This uses drawpoly . Homogeneous coordinates for 2 \ and how they can be manipulated with 3 3 × matrices are novel ideas to most students. Computer science majors especially like this. (Section 2.7) Subspaces (20). Span is a hard concept for many students, and this has proved to be the most challenging project. You can pair up the students and assign each group a different pair of matrices, A and B. Each matrix A is 5 4 × , B is 5 5 × , and both have rank 4. There are 25 pairs of integer matrices in the file submats . The first 17 pairs do have the same column space, and the last 8 pairs do not. If you prefer to generate your own matrices, here are commands create a pair that do have the same 4-dimensional column spaces: A = randomint(5,5,4), B = A*randomint(5,4,4) If you want A and B that do not have the same column spaces, try this instead: A = randomint(5,5,4), B = randomint(5,4,4) (The command randomint(m,n,k) yields an m n × matrix with rank k .) Students quickly reduce A and B and see they have the same rank. They don't feel very comfortable with sets, but after they discuss the problem with me and each other for a while, usually they figure out that they can row reduce [ A B ] and then explain in words why the result shows that each column of B is in Col A , hence Col B is a subset of Col A . An elementary way to finish would be to reduce [ B A ] to see that Col A is also a subset of Col B , and then conclude that the two sets must be the same, but few students seem to think of doing that. Instead they

  16. Page 16
    Read page 16 as text

    Computer Projects 13 explain that Col B is inside Col A and has the same dimension so by Theorem 15, a basis for Col B must span Col A . This project could be assigned after Section 4.6 (or Section 2.9 if you cover that instead). Markov Chains and Long-Range Predictions (5-10 points, depending on how much help is given ahead of time). This is fun and good motivation for eigenvalues and eigenvectors. If you ask everyone to do this project, you should give a brief introduction to Markov processes. (Section 4.9) R Real and Complex Eigenvalues (5). This is easy and you could assign it instead of lecturing on complex eigenvalues. Students calculate some complex eigenvalues by hand and then create some examples of their own to be sure they really look at the matrix entries. Then they learn how to use MATLAB’s eig function to find eigenvalues and eigenvectors. (Section 5.5) R Using Eigenvalues to Study Spotted Owls (10). Before assigning this, either lecture on complex eigenvalues or assign the previous project. This is a long project but students like it. It is a lovely application of eigenvalues and diagonalizability, and includes some plotting. Most of the theory from Sections 5.1-5.3 is applied. Students use eig and experiment to find the critical value of t , the survival rate for juvenile → subadult ("critical" means the minimum value of t which makes the dominant eigenvalue at least 1). The extra credit question asks users to verify theoretically what they have seen experimentally. It is challenging but many hints are given. The idea for this question is due to Andre Weideman and used with his permission. Techniques from calculus can be used to show that the stage matrix will always have its dominant eigenvalue real and positive and be diagonalizable, and then one can derive a formula for the critical value of t . (Sections 5.5 and 5.6) QR Factorization (5). This is not hard and should be of interest to many students, since QR factorizations are widely used in practice. Students will learn how MATLAB's qr function differs from the QR factorization developed in the text and also will verify the connection beween QR factorization and the Gram Schmidt Process. (Section 6.4) The QR Method for Calculating Eigenvalues (10). Some students will be very interested in this project. Here they use the qr function to experiment with the basic QR algorithm for eigenvalues and with a shift-deflate version of it. This type of iterative process is used in modern software for calculating eigenvalues. It never fails to amaze that the processes usually work! Convergence is discussed briefly and a reference given for more information. Two functions in Laydata4 Toolbox, qrbasic and qrshift , assist with the calculations. (Sections 5.2 and 6.4) R Least-Squares Solutions and Curve Fitting (5). This is easy and can be done early in Chapter 6 to motivate the ideas. The text algorithm is used to calculate coefficients for the least squares line, quadratic and cubic curves; norm is used to calculate least squares error, and plot is used to graph the data and the curves. An end note describes how to use polyval and polyfit , which are MATLAB functions that can do most of the work for you. In question 2(b), most students guess 3 ( ) vel and say the error is smaller for the cubic than for the line or quadratic, and that is acceptable to some including me. However, the correct answer is that drag depends on 2 ( ) vel . Consider giving an extra credit point to anyone who sees that this is sensible guess since the quadratic curve is a dramatically better fit to the data than the line, but the cubic gives very little improvement. These things are evident both from the graph and the errors. In fact, the theoretical formula is 2 ( ) drag c vel A ρ = where ρ is air density, c is the coefficient of drag, which varies with the angle of attack, and A is the surface area of the wing.

1067 more pages in the full document

Unlock it once and it stays in your library, ready to chat with or turn into flashcards.

Unlock the full document
See all

Study this document with CramX

Once it is in your library, every tool can work from it.