**| Preface
| Table of Contents | Software | Errata
List |**

**| Books
| Papers | Research
| Biographical | Home |**

Matlab affects the way we do research in scientific computing because it encourages experimentation with interesting mathematical ideas. Visualization and vector-level thinking are supported in a way that permits focus on high-level issues. It is by clearing such a wide path from research to applications that Matlab has been such an uplifting force in computational science. For exactly the same reasons, Matlab can uplift the teaching of introductory scientific computing. Students need to

playwith the mathematics that stands behind each and every new method that they learn. They need graphics to appreciate convergence and error. They need a matrix-vector programming language to solidify their understanding of linear algebra and to prepare for a world of advanced array-level computing. They need a total problem solving environment tapping into the very latest algorithmic research that has a bearing on science and engineering. In short, they need Matlab.

In this textbook I present all the topics that are usually covered in a one-semester introduction to scientific computing. But graphics and matrix-vector manipulation have been folded into the presentation in a way that gets students to appreciate the connection between continuous mathematics and computing. Each of the nine chapters comes equipped with a theorem. Analysis is complemented with computational experiments that are designed to bolster intuition. Indeed, the text revolves around examples that are packaged in 200+ M-files. These codes are critical to the overall presentation. Collectively they communicate all the key mathematical ideas and an appreciation for the subtleties of numerical computing. They also illustrate many features of Matlab that are likely to be useful later on in the student's computational career. Snapshots of advanced computing are given in sections that deal with parallel adaptive quadrature and parallel matrix computations. Our treatment of recursion includes divided differences, adaptive approximation, quadrature, the fast Fourier transform, Strassen matrix multiplication, and the Cholesky factorization. Numerical linear algebra is not confined to the matrix computation units. Because of the graphics thread throughout the text, it permeates the entire presentation beginning in Chapter 1. That first chapter is yet another get-started-with-Matlab tutorial, but it is driven by examples that set the stage for the numerical algorithms that follow.

I want to thank the students of CS 222 at Cornell University who inspired me to write this book. My colleagues Yuying Li and Steve Vavasis were of immense help during the revision process. Cindy Robinson has been my administrative assistant since 1987 and has seen me through the production of five textbooks. Cindy's thoughtful support was essential during this period.

Finally, Cleve Moler has played a very critical role in my academic career ever since I first walked into his office while an undergraduate at the University of Michigan. As teacher, Ph.D. advisor, and force behind Matlab, Cleve has defined the way I look at mathematics and computing. I am extremely happy to dedicate this textbook to him.

## Chapter 1. Power Tools of the Trade

**1.1 Vectors and Plotting****1.2**More Vectors, More Plotting, and Now Matrices**1.3**Building Exploratory Environments**1.4**Error**1.5**Designing Functions**2.1 The Vandermonde Approach**- 2.2 The Newton Representation
- 2.3 Properties
- 2.4 Special Topics
**3.1 Piecewise Linear Interpolation**- 3.2 Piecewise Cubic Hermite Interpolation
- 3.3 Cubic Splines
**4.1 The Newton-Cotes Rules**- 4.2 Composite Rules
- 4.3 Adaptive Quadrature
- 4.4 Special Topics
- 4.5 Shared Memory Adaptive Quadrature
**5.1 Setting Up Matrix Problems**- 5.2 Matrix Operations
- 5.3 Once Again, Setting Up Matrix Problems
- 5.4 Recursive Matrix Operations
- 5.5 Distributed Memory Matrix Multiplication
**6.1 Triangular Problems**- 6.2 Banded Problems
- 6.3 Full Problems
- 6.4 Analysis
**7.1 Least Squares Fitting**- 7.2 The QR factorization
- 7.3 The Cholesky Factorization
- 7.4 High-Performance Cholesky
**8.1 Finding Roots**- 8.2 Minimization a Function of One Variable
- 8.3 Minimizing Multivariate Functions
- 8.4 Solving Systems of Nonlinear Equations
**9.1 Basic Concepts**- 9.2 The Runge-Kutta Methods
- 9.3 The Adams Methods

Second edition M-Files:

| Chapter 1 | Chapter 2 | Chapter 3 | Chapter 4 | Chapter 5|

| Chapter 6 | Chapter 7 | Chapter 8 | Chapter 9 |

First edition M-files:

If you'd like to download the code yourself, it's available by FTP:

- For Mac (125kb SCMV.sit.hqx file).
- For other
systems (MS-DOS or UNIX 43kb SCMV.tar.gz).

You uncompress and untar with the UNIX command:

`zcat SCMV.tar.gz | tar xfv -`

It is highly recommended you get and use zcat. - Or just browse through an FTP session.