The Central Idea

A basic linear system has the form

\[ \boxed{A\mathbf{x}=\mathbf{b}}, \]

where \(A\) is a matrix, \(\mathbf{x}\) is the unknown vector, and \(\mathbf{b}\) is the right-hand side.

In exact mathematics, the question is whether a solution exists and how it can be characterized. In numerical computation, we must also ask:

Why Linear Algebra Is Central to Numerical Computing

Many nonlinear or continuous problems become linear algebra problems after approximation.

Matrix systems arise in:

Exact Linear Algebra and Numerical Linear Algebra

Exact linear algebra studies identities such as

\[ A^{-1}A=I. \]

Numerical linear algebra studies what happens when matrix entries and arithmetic are represented approximately.

A computed result may therefore satisfy

\[ \widehat{A^{-1}A}\approx I \]

rather than reproduce the exact identity bit for bit.

Solving a \(2\times2\) System

Consider

\[ \begin{aligned} 2x+y&=5,\\ x-y&=1. \end{aligned} \]

In matrix form,

\[ \begin{bmatrix} 2&1\\ 1&-1 \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix} = \begin{bmatrix} 5\\ 1 \end{bmatrix}. \]

The numerical methods in this lesson generalize this familiar process to much larger systems.

Direct and Iterative Methods

Numerical methods for linear systems fall broadly into two families.

  1. Direct methods aim to obtain the solution after a finite sequence of algebraic operations.
  2. Iterative methods produce a sequence of approximations that ideally converges to the solution.

Direct Methods

Important direct methods include:

In finite precision, even a direct method produces an approximation rather than an exact symbolic result.

Iterative Methods

Iterative methods begin with an approximation

\[ \mathbf{x}^{(0)} \]

and construct

\[ \mathbf{x}^{(1)},\mathbf{x}^{(2)},\ldots \]

with the goal

\[ \mathbf{x}^{(k)}\to\mathbf{x}. \]

They become especially important for large sparse systems.

Gaussian Elimination

Gaussian elimination systematically removes variables from a linear system.

The matrix is transformed into upper-triangular form:

\[ U\mathbf{x}=\mathbf{c}, \]

where \(U\) has zeros below the diagonal.

The unknowns are then recovered by back substitution.

Elimination as Row Operations

The legal elementary row operations are:

  1. interchange two rows;
  2. multiply a row by a nonzero scalar;
  3. add a multiple of one row to another.

In numerical algorithms, these operations must also be evaluated for stability and rounding behavior.

A First Elimination Step

Consider

\[ \begin{bmatrix} 2&1\\ 4&3 \end{bmatrix}. \]

To eliminate the \(4\) below the first pivot, use the multiplier

\[ m=\frac42=2. \]

Replace the second row by

\[ R_2\leftarrow R_2-2R_1. \]

The result is

\[ \begin{bmatrix} 2&1\\ 0&1 \end{bmatrix}. \]

Pivots

A pivot is the matrix entry used to eliminate entries beneath it.

Dividing by a pivot that is zero is impossible.

Dividing by a pivot that is extremely small can also create large multipliers and numerical instability.

Why Small Pivots Are Dangerous

Suppose the pivot is

\[ 10^{-12}. \]

Dividing an ordinary-sized entry by this pivot can produce a multiplier on the order of

\[ 10^{12}. \]

Large intermediate values can magnify rounding error and produce severe cancellation.

Pivoting

Pivoting reorders equations so that a more suitable pivot is used.

The most common strategy is partial pivoting, which selects a large-magnitude entry from the current column.

Partial Pivoting

At elimination step \(k\), partial pivoting selects a row \(p\) satisfying

\[ |a_{pk}| = \max_{i\ge k}|a_{ik}|. \]

Rows \(p\) and \(k\) are then exchanged before elimination continues.

This helps control the size of elimination multipliers.

Complete Pivoting

Complete pivoting searches the remaining submatrix for a large pivot and may interchange both rows and columns.

It can provide additional protection but requires more searching and bookkeeping.

Partial pivoting is the standard practical compromise for many dense systems.

LU Factorization

Gaussian elimination can often be organized as a matrix factorization

\[ \boxed{A=LU}, \]

where \(L\) is lower triangular and \(U\) is upper triangular.

With row pivoting, the relationship is commonly written

\[ \boxed{PA=LU}, \]

where \(P\) is a permutation matrix.

Why LU Factorization Is Useful

Suppose many systems share the same matrix:

\[ A\mathbf{x}_1=\mathbf{b}_1, \qquad A\mathbf{x}_2=\mathbf{b}_2, \qquad \ldots \]

Factor \(A\) once:

\[ PA=LU. \]

Each new right-hand side can then be solved using inexpensive triangular solves.

Forward Substitution

For a lower-triangular system

\[ L\mathbf{y}=\mathbf{b}, \]

the first equation determines \(y_1\), the second determines \(y_2\), and so on.

This sequential process is called forward substitution.

Back Substitution

For an upper-triangular system

\[ U\mathbf{x}=\mathbf{y}, \]

the final equation determines the last unknown first.

The solution then proceeds upward through the system.

This is back substitution.

Do Not Form the Inverse Just to Solve a System

Mathematically,

\[ \mathbf{x}=A^{-1}\mathbf{b}. \]

But explicitly computing \(A^{-1}\) is usually unnecessary when the goal is only to solve

\[ A\mathbf{x}=\mathbf{b}. \]

Factorization and triangular solves are generally more efficient and numerically preferable.

Cholesky Factorization

If \(A\) is symmetric positive definite, it has a special factorization

\[ \boxed{A=LL^{T}}, \]

where \(L\) is lower triangular.

Cholesky factorization exploits matrix structure and can be more efficient than a general LU factorization.

Positive Definite Matrices

A real symmetric matrix \(A\) is positive definite if

\[ \mathbf{x}^{T}A\mathbf{x}>0 \]

for every nonzero vector \(\mathbf{x}\).

Positive-definite matrices arise naturally in optimization, energy models, least-squares systems, and differential-equation discretizations.

QR Factorization

A matrix \(A\) may be factored as

\[ \boxed{A=QR}, \]

where \(Q\) has orthonormal columns and \(R\) is upper triangular.

QR factorization is especially important in least squares and eigenvalue computation.

Orthogonal Matrices Are Numerically Valuable

For an orthogonal matrix \(Q\),

\[ Q^TQ=I. \]

Orthogonal transformations preserve Euclidean length:

\[ \|Q\mathbf{x}\|_2=\|\mathbf{x}\|_2. \]

This norm-preserving behavior is one reason orthogonal methods are important in stable numerical algorithms.

Householder Transformations

A Householder transformation has the form

\[ H=I-2\frac{\mathbf{v}\mathbf{v}^T}{\mathbf{v}^T\mathbf{v}}. \]

It reflects vectors across a hyperplane.

Householder transformations can systematically introduce zeros and are widely used to compute QR factorizations stably.

Givens Rotations

A Givens rotation acts in a selected coordinate plane to eliminate one matrix entry.

These rotations are particularly useful when matrices are sparse or when a factorization must be updated incrementally.

Least Squares

An overdetermined system

\[ A\mathbf{x}\approx\mathbf{b} \]

may have more equations than unknowns and no exact solution.

Least squares chooses \(\mathbf{x}\) to minimize

\[ \boxed{\|A\mathbf{x}-\mathbf{b}\|_2}. \]

The Residual Vector

For an approximate solution \(\widehat{\mathbf{x}}\), define

\[ \boxed{ \mathbf{r} = \mathbf{b}-A\widehat{\mathbf{x}} }. \]

The residual measures how well the computed vector satisfies the original equations.

Residual Is Not the Same as Solution Error

The solution error is

\[ \widehat{\mathbf{x}}-\mathbf{x}. \]

The residual is

\[ \mathbf{b}-A\widehat{\mathbf{x}}. \]

A small residual does not necessarily imply a small solution error when the matrix is ill-conditioned.

Matrix Conditioning

For a nonsingular matrix, a standard condition number is

\[ \boxed{ \kappa(A) = \|A\|\|A^{-1}\| }. \]

The exact numerical value depends on the norm.

A large condition number signals sensitivity of the solution to perturbations.

Condition Number in the \(2\)-Norm

In the Euclidean operator norm,

\[ \boxed{ \kappa_2(A) = \frac{\sigma_{\max}(A)} {\sigma_{\min}(A)} }, \]

where \(\sigma_{\max}\) and \(\sigma_{\min}\) are the largest and smallest singular values.

A very small smallest singular value indicates near singularity.

Near-Singular Systems

If a matrix is close to singular, small perturbations in its entries or in \(\mathbf{b}\) can produce large changes in the solution.

This is an issue of conditioning, not necessarily an algorithmic failure.

Perturbation in the Right-Hand Side

Suppose

\[ A\mathbf{x}=\mathbf{b} \]

and the right-hand side changes to

\[ \mathbf{b}+\Delta\mathbf{b}. \]

The solution changes to

\[ \mathbf{x}+\Delta\mathbf{x}. \]

Condition numbers provide bounds relating relative changes in \(\mathbf{b}\) to relative changes in \(\mathbf{x}\).

Backward Error for Linear Systems

A computed solution \(\widehat{\mathbf{x}}\) can be interpreted through a nearby problem:

\[ (A+\Delta A)\widehat{\mathbf{x}} = \mathbf{b}+\Delta\mathbf{b}. \]

If the required perturbations are small, the algorithm has small backward error.

Gaussian Elimination with Pivoting and Stability

Gaussian elimination with partial pivoting is widely used because it is generally effective at controlling numerical growth.

Its practical success comes from keeping elimination multipliers moderate and avoiding unnecessary division by small pivots.

Growth Factor

During elimination, intermediate entries may become larger than the original matrix entries.

The growth factor measures this amplification.

Large growth can increase the effect of floating-point rounding.

Scaling a Linear System

Rows or columns may differ greatly in magnitude.

Scaling can bring quantities to more comparable numerical ranges before factorization or iteration.

Proper scaling can improve numerical behavior and make tolerances easier to interpret.

Sparse Matrices

A sparse matrix contains mostly zeros.

Large systems from differential equations and networks are often sparse.

Sparse numerical linear algebra stores and computes primarily with the nonzero entries rather than treating the matrix as dense.

Fill-In

During Gaussian elimination, entries that were originally zero can become nonzero.

This phenomenon is called fill-in.

Sparse direct solvers often reorder rows and columns to reduce fill-in and memory usage.

Jacobi Iteration

Split the matrix as

\[ A=D+L+U, \]

where \(D\) is diagonal and \(L\) and \(U\) contain the lower and upper off-diagonal parts.

Jacobi iteration can be written

\[ \boxed{ \mathbf{x}^{(k+1)} = D^{-1} \left( \mathbf{b}-(L+U)\mathbf{x}^{(k)} \right) }. \]

Component Form of Jacobi Iteration

For the system

\[ A\mathbf{x}=\mathbf{b}, \]

Jacobi updates each component using values from the previous iteration:

\[ \boxed{ x_i^{(k+1)} = \frac{1}{a_{ii}} \left( b_i - \sum_{j\ne i}a_{ij}x_j^{(k)} \right) }. \]

Gauss-Seidel Iteration

Gauss-Seidel improves on the Jacobi idea by using newly updated components as soon as they become available.

Its matrix form is

\[ \boxed{ (D+L)\mathbf{x}^{(k+1)} = \mathbf{b}-U\mathbf{x}^{(k)} }. \]

Why Iterative Methods Can Be Attractive

For very large sparse systems, direct factorization may require substantial memory and computation.

Iterative methods can exploit:

Convergence of Stationary Iterations

Many linear iterations have the form

\[ \mathbf{x}^{(k+1)} = T\mathbf{x}^{(k)}+\mathbf{c}. \]

The error satisfies

\[ \mathbf{e}^{(k+1)} = T\mathbf{e}^{(k)}. \]

Convergence is therefore controlled by powers of \(T\).

Spectral Radius

The spectral radius of \(T\) is

\[ \boxed{ \rho(T) = \max_i|\lambda_i(T)| }. \]

For a stationary linear iteration, the condition

\[ \boxed{\rho(T)<1} \]

is the fundamental convergence criterion.

Diagonal Dominance

A matrix is strictly diagonally dominant by rows when

\[ |a_{ii}| > \sum_{j\ne i}|a_{ij}| \]

for every row.

Diagonal dominance provides useful sufficient conditions for convergence of common stationary iterative methods.

Conjugate Gradient

For large symmetric positive-definite systems, the conjugate-gradient method is a major iterative solver.

Rather than correcting one coordinate at a time, it builds search directions adapted to the geometry induced by \(A\).

It can converge efficiently without forming a matrix factorization.

Krylov Subspaces

Many modern iterative methods build approximations in a Krylov subspace:

\[ \mathcal{K}_k(A,\mathbf{r}_0) = \operatorname{span} \left\{ \mathbf{r}_0, A\mathbf{r}_0, A^2\mathbf{r}_0, \ldots, A^{k-1}\mathbf{r}_0 \right\}. \]

Conjugate gradient and GMRES are important examples.

Preconditioning

A preconditioner transforms a linear system into one that is easier for an iterative method to solve.

Ideally, choose \(M\) so that

\[ M^{-1}A \]

has more favorable spectral or conditioning properties while systems involving \(M\) remain inexpensive to solve.

The Goal of Preconditioning

A good preconditioner balances two competing goals:

  1. make the transformed system easier to solve;
  2. keep application of the preconditioner inexpensive.

A perfect preconditioner that is as expensive as solving the original problem offers little practical advantage.

Stopping Criteria for Iterative Solvers

A common stopping test uses the residual:

\[ \|\mathbf{r}^{(k)}\| = \|\mathbf{b}-A\mathbf{x}^{(k)}\|. \]

A relative criterion may require

\[ \boxed{ \frac{\|\mathbf{r}^{(k)}\|} {\|\mathbf{b}\|} \le \tau }. \]

Residual Reduction Is Not the Whole Story

An ill-conditioned matrix can convert a small residual into a larger solution error.

Therefore, iterative stopping criteria should be interpreted together with matrix conditioning and application requirements.

Eigenvalue Problems

An eigenvalue problem seeks

\[ \boxed{ A\mathbf{v} = \lambda\mathbf{v} }, \]

where \(\mathbf{v}\neq\mathbf{0}\).

Numerical eigenvalue methods are essential in stability analysis, vibration, quantum models, principal-component methods, and dynamical systems.

The Power Method

Starting from a nonzero vector \(\mathbf{x}_0\), repeatedly compute

\[ \mathbf{y}_{k+1}=A\mathbf{x}_k \]

and normalize:

\[ \mathbf{x}_{k+1} = \frac{\mathbf{y}_{k+1}} {\|\mathbf{y}_{k+1}\|}. \]

Under suitable conditions, the direction approaches an eigenvector associated with the dominant eigenvalue.

Dominant Eigenvalue

A dominant eigenvalue has magnitude greater than the magnitudes of the competing eigenvalues:

\[ |\lambda_1| > |\lambda_2| \ge |\lambda_3| \ge \cdots. \]

The ratio

\[ \left|\frac{\lambda_2}{\lambda_1}\right| \]

influences the convergence rate of the power method.

The Rayleigh Quotient

For a nonzero vector \(\mathbf{x}\), define

\[ \boxed{ R(\mathbf{x}) = \frac{\mathbf{x}^TA\mathbf{x}} {\mathbf{x}^T\mathbf{x}} }. \]

When \(\mathbf{x}\) approximates an eigenvector, the Rayleigh quotient provides an associated eigenvalue estimate.

The QR Algorithm

QR factorization also supports a fundamental eigenvalue iteration.

Starting with \(A_0=A\), factor

\[ A_k=Q_kR_k \]

and form

\[ A_{k+1}=R_kQ_k. \]

With appropriate refinements, this process forms the basis of modern dense eigenvalue computation.

Singular Value Decomposition

Any real \(m\times n\) matrix has a singular value decomposition

\[ \boxed{ A=U\Sigma V^T }. \]

The diagonal entries of \(\Sigma\) are the singular values.

The SVD reveals rank, conditioning, dominant directions, and low-dimensional structure.

Numerical Rank

In exact arithmetic, rank depends on whether singular values are exactly zero.

In finite precision, a tiny singular value may be indistinguishable from zero relative to the scale and accuracy of the problem.

This leads to the idea of numerical rank.

Least Squares and Normal Equations

The least-squares problem

\[ \min_{\mathbf{x}} \|A\mathbf{x}-\mathbf{b}\|_2 \]

leads formally to the normal equations

\[ \boxed{ A^TA\mathbf{x} = A^T\mathbf{b} }. \]

However, forming \(A^TA\) can worsen conditioning.

Why QR Is Often Preferred for Least Squares

If

\[ A=QR, \]

then

\[ \|A\mathbf{x}-\mathbf{b}\|_2 = \|QR\mathbf{x}-\mathbf{b}\|_2. \]

Orthogonal transformations preserve Euclidean norms and avoid explicitly squaring the condition number through \(A^TA\).

Conditioning of the Normal Equations

In the \(2\)-norm,

\[ \boxed{ \kappa_2(A^TA) = \kappa_2(A)^2 } \]

for full-column-rank \(A\).

A moderately ill-conditioned matrix can therefore become much more difficult when converted to normal equations.

Backward Stability and Matrix Algorithms

A numerically stable matrix algorithm often produces the exact result for a nearby matrix problem.

For example, a computed factorization may satisfy

\[ A+\Delta A = \widehat{L}\widehat{U} \]

for a small perturbation \(\Delta A\).

This is the matrix analogue of backward stability developed earlier.

Floating-Point Effects in Dot Products

A dot product is

\[ \mathbf{x}^T\mathbf{y} = \sum_{i=1}^{n}x_i y_i. \]

Each multiplication and addition can introduce rounding.

Since dot products appear throughout matrix multiplication and factorizations, their error behavior is fundamental to numerical linear algebra.

Matrix Multiplication and Accumulated Error

Each entry of

\[ C=AB \]

is a dot product:

\[ c_{ij} = \sum_k a_{ik}b_{kj}. \]

Large matrix computations therefore involve many opportunities for finite- precision error to accumulate.

Computational Complexity

Numerical algorithms must be judged not only by accuracy but also by cost.

Dense Gaussian elimination for an \(n\times n\) system requires on the order of

\[ \boxed{n^3} \]

arithmetic operations.

Triangular solves require on the order of \(n^2\) operations.

Why Factorization Reuse Matters

If one matrix \(A\) is used with many right-hand sides, paying the \(O(n^3)\) factorization cost once can be efficient.

Each later solve then costs roughly

\[ O(n^2). \]

Algorithm design should therefore consider the full workload, not only a single solve.

Memory Complexity Matters Too

A dense \(n\times n\) matrix contains

\[ n^2 \]

entries.

For very large \(n\), memory can become the dominant constraint even before arithmetic cost does.

Sparse storage and matrix-free methods address this issue.

Matrix-Free Computation

Some iterative methods require only the ability to compute

\[ A\mathbf{x} \]

for arbitrary vectors \(\mathbf{x}\).

The full matrix need not always be stored explicitly.

This can be valuable for extremely large discretized systems.

Verification by Residual

After computing \(\widehat{\mathbf{x}}\), evaluate

\[ \mathbf{r} = \mathbf{b}-A\widehat{\mathbf{x}}. \]

A small residual is an essential consistency check.

It should be interpreted relative to the scales of \(A\), \(\widehat{\mathbf{x}}\), and \(\mathbf{b}\).

A Scaled Residual

One useful dimensionless diagnostic is

\[ \boxed{ \frac{\|\mathbf{b}-A\widehat{\mathbf{x}}\|} {\|A\|\|\widehat{\mathbf{x}}\|+\|\mathbf{b}\|} }. \]

This places the raw residual in context and is closely related to backward-error reasoning.

Iterative Refinement

After obtaining \(\widehat{\mathbf{x}}\), compute the residual

\[ \mathbf{r} = \mathbf{b}-A\widehat{\mathbf{x}}. \]

Solve the correction equation

\[ A\Delta\mathbf{x} = \mathbf{r} \]

and update

\[ \widehat{\mathbf{x}} \leftarrow \widehat{\mathbf{x}}+\Delta\mathbf{x}. \]

This process is called iterative refinement.

Why Iterative Refinement Can Help

A computed factorization may already contain rounding error, yet residual information can reveal how the approximate solution fails to satisfy the original equations.

Correcting that residual can improve the solution, especially when residuals are evaluated accurately enough.

Choosing a Solver by Matrix Structure

Matrix structure should guide method selection.

A Reliable Direct-Solve Workflow

  1. Inspect matrix dimensions and structure.
  2. Check scaling and obvious singularity issues.
  3. Select a structure-appropriate factorization.
  4. Use pivoting when required.
  5. Solve the resulting triangular systems.
  6. Compute a residual.
  7. Estimate conditioning when accuracy matters.
  8. Apply iterative refinement if useful.

A Reliable Iterative-Solve Workflow

  1. Identify matrix structure and sparsity.
  2. Select an appropriate iterative method.
  3. Choose an initial guess.
  4. Apply a useful preconditioner when available.
  5. Monitor residual reduction.
  6. Watch for stagnation or divergence.
  7. Stop using absolute and relative criteria appropriate to the problem.
  8. Verify the final residual and interpret it through conditioning.

A Reliable Least-Squares Workflow

  1. Form the design matrix \(A\) and data vector \(\mathbf{b}\).
  2. Inspect scaling and rank.
  3. Avoid normal equations when conditioning is a concern.
  4. Use QR for a stable general solve.
  5. Use SVD when rank deficiency or sensitivity must be diagnosed.
  6. Compute and inspect the residual.
  7. Interpret parameter uncertainty in the context of conditioning.

Common Error: Forming \(A^{-1}\) Unnecessarily

The formula

\[ \mathbf{x}=A^{-1}\mathbf{b} \]

is mathematically correct but does not mean the inverse should be explicitly formed in numerical software.

Factorization-based solves are normally the better computational strategy.

Common Error: Eliminating Without Pivoting

A tiny pivot can create enormous multipliers and severe rounding amplification.

Row exchanges are not merely cosmetic; they can be essential to numerical stability.

Common Error: Treating a Small Residual as Proof of Accuracy

A small residual shows that the computed vector nearly satisfies the equations.

An ill-conditioned matrix can still produce a large solution error.

Residual and condition number should be interpreted together.

Common Error: Ignoring Matrix Structure

Applying a generic dense solver to every problem can waste computation and sacrifice numerical advantages.

Symmetry, positive definiteness, sparsity, band structure, and rank information can all guide a better method.

Common Error: Using Normal Equations Automatically

Normal equations are mathematically valid for least squares, but

\[ \kappa_2(A^TA) = \kappa_2(A)^2 \]

can make the numerical problem substantially more sensitive.

QR or SVD is often preferable when accuracy matters.

Common Error: Ignoring Scaling

Large disparities in row or column magnitudes can make numerical behavior harder to control.

Rescaling can improve algorithmic performance without changing the underlying solution in an essential way.

Common Error: Iterating Without a Convergence Test

An iterative method should not be assumed to converge simply because it produces a sequence of vectors.

Analyze the iteration matrix, spectral properties, residual trend, and structural convergence conditions.

Common Error: Stopping at a Fixed Iteration Count

A fixed iteration budget may stop too early on a difficult system or waste work on an easy one.

Error- or residual-based stopping criteria are usually more informative.

Example: One Jacobi Step

Consider

\[ \begin{aligned} 4x+y&=9,\\ x+3y&=7. \end{aligned} \]

Rewrite:

\[ x=\frac{9-y}{4}, \qquad y=\frac{7-x}{3}. \]

Starting from

\[ x^{(0)}=0, \qquad y^{(0)}=0, \]

Jacobi gives

\[ x^{(1)}=\frac94=2.25 \]

and

\[ y^{(1)}=\frac73\approx2.3333. \]

Example: One Gauss-Seidel Step

Using the same system and starting point, compute

\[ x^{(1)}=\frac94=2.25. \]

Gauss-Seidel immediately uses this new value:

\[ y^{(1)} = \frac{7-2.25}{3} = \frac{4.75}{3} \approx 1.5833. \]

The distinction is that Gauss-Seidel uses newly available information within the same iteration.

Example: Matrix Condition Number

Suppose

\[ \|A\|=8 \]

and

\[ \|A^{-1}\|=25. \]

Then

\[ \boxed{ \kappa(A)=8(25)=200 }. \]

This indicates substantial sensitivity compared with a condition number near \(1\).

Example: Residual Check

Suppose

\[ A= \begin{bmatrix} 2&1\\ 1&3 \end{bmatrix}, \qquad \widehat{\mathbf{x}} = \begin{bmatrix} 1\\ 2 \end{bmatrix}. \]

Then

\[ A\widehat{\mathbf{x}} = \begin{bmatrix} 4\\ 7 \end{bmatrix}. \]

If

\[ \mathbf{b} = \begin{bmatrix} 4\\ 7 \end{bmatrix}, \]

the residual is

\[ \boxed{ \mathbf{r} = \mathbf{0} }. \]

Practice 1: Matrix Form

Write the system

\[ \begin{aligned} 3x+2y&=7,\\ x-4y&=5 \end{aligned} \]

in the form

\[ A\mathbf{x}=\mathbf{b}. \]

Practice 2: Elimination Multiplier

In

\[ \begin{bmatrix} 5&2\\ 15&7 \end{bmatrix}, \]

what multiplier eliminates the \(15\) below the first pivot?

Practice 3: Why Pivot?

Explain why a row exchange may be desirable when the current pivot has very small magnitude.

Practice 4: Condition Number

If

\[ \|A\|=6 \]

and

\[ \|A^{-1}\|=40, \]

compute \(\kappa(A)\).

Practice 5: Residual

Let

\[ A= \begin{bmatrix} 1&2\\ 3&4 \end{bmatrix}, \qquad \widehat{\mathbf{x}} = \begin{bmatrix} 1\\ 1 \end{bmatrix}, \qquad \mathbf{b} = \begin{bmatrix} 3\\ 8 \end{bmatrix}. \]

Compute

\[ \mathbf{r} = \mathbf{b}-A\widehat{\mathbf{x}}. \]

Practice 6: Choose the Factorization

Which factorization is especially natural for a symmetric positive-definite matrix?

Practice 7: Least Squares

What quantity is minimized in the standard linear least-squares problem?

Practice 8: Jacobi Concept

In Jacobi iteration, are newly computed components used immediately within the same iteration or only on the next iteration?

Practice 9: Spectral Radius

A stationary iterative method has iteration matrix \(T\) with

\[ \rho(T)=0.72. \]

What does this suggest about convergence?

Practice 10: Normal Equations

If

\[ \kappa_2(A)=100, \]

what is

\[ \kappa_2(A^TA) \]

for a full-column-rank matrix?

Practice Answers

Practice 1

\[ \boxed{ \begin{bmatrix} 3&2\\ 1&-4 \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix} = \begin{bmatrix} 7\\ 5 \end{bmatrix} }. \]

Practice 2

The multiplier is

\[ m=\frac{15}{5}=\boxed{3}. \]

Practice 3

Dividing by a tiny pivot can create very large elimination multipliers, which magnify rounding error and produce large intermediate values. A row exchange can provide a safer pivot.

Practice 4

\[ \kappa(A) = \|A\|\|A^{-1}\| = 6(40) = \boxed{240}. \]

Practice 5

First,

\[ A\widehat{\mathbf{x}} = \begin{bmatrix} 1&2\\ 3&4 \end{bmatrix} \begin{bmatrix} 1\\ 1 \end{bmatrix} = \begin{bmatrix} 3\\ 7 \end{bmatrix}. \]

Therefore,

\[ \mathbf{r} = \begin{bmatrix} 3\\ 8 \end{bmatrix} - \begin{bmatrix} 3\\ 7 \end{bmatrix} = \boxed{ \begin{bmatrix} 0\\ 1 \end{bmatrix} }. \]

Practice 6

The natural factorization is

\[ \boxed{A=LL^T}, \]

the Cholesky factorization.

Practice 7

Standard least squares minimizes

\[ \boxed{\|A\mathbf{x}-\mathbf{b}\|_2}. \]

Practice 8

Jacobi uses values from the previous iteration. Newly computed components are not used until the next iteration.

Practice 9

Since

\[ \rho(T)=0.72<1, \]

the stationary iteration satisfies the fundamental spectral-radius condition for convergence.

Practice 10

\[ \kappa_2(A^TA) = \kappa_2(A)^2 = 100^2 = \boxed{10000}. \]

What to Remember

Numerical linear algebra studies how matrix computations behave under finite precision.

Where We Go Next

Numerical linear algebra provides machinery for discrete matrix systems. The next lesson turns to another central approximation task: constructing functions that pass through or closely represent known data.

The next lesson, Interpolation, develops polynomial interpolation, Lagrange and Newton forms, divided differences, interpolation error, piecewise methods, and the numerical issues that arise when discrete data are used to construct continuous approximations.