Midterm 1: Linear Systems, Gaussian Elimination, and LU Factorization
Welcome, students π This lesson prepares you for Midterm 1 in Numerical Analysis by focusing on the ideas that connect the exam to the broader study of linear systems. The goal is not just to memorize procedures, but to understand why they work and how they are used in practice.
Learning goals
By the end of this lesson, students will be able to:
- explain the main ideas and vocabulary behind Midterm 1,
- apply numerical reasoning to solve linear systems,
- connect the exam topics to Gaussian elimination and LU factorization,
- summarize how this lesson fits into the larger unit on linear systems,
- use examples and evidence from numerical methods to support answers.
What Midterm 1 is really testing
Midterm 1 in a Numerical Analysis course usually checks whether you can think like a numerical method user, not just a calculator user. That means you should know how to solve problems by hand on small examples, explain the steps clearly, and understand the purpose of each method. For this topic, the main focus is on systems of linear equations of the form $A\mathbf{x}=\mathbf{b}$, where $A$ is a matrix, $\mathbf{x}$ is the unknown vector, and $\mathbf{b}$ is the right-hand-side vector.
A linear system is a collection of equations that all have the unknowns to the first power. For example,
$$
$\begin{aligned}$
$2x+y&=5,\\$
$-x+3y&=4.$
$\end{aligned}$
$$
This system can be written as $A\mathbf{x}=\mathbf{b}$ with
$$
$A=\begin{bmatrix}2&1\\-1&3\end{bmatrix},\quad$
$\mathbf{x}=\begin{bmatrix}x\y\end{bmatrix},\quad$
$\mathbf{b}=\begin{bmatrix}5\\4\end{bmatrix}.$
$$
The big idea is that one matrix equation can represent many equations at once. This is powerful because it lets us use organized, repeatable algorithms to solve problems efficiently.
Midterm 1 often asks you to interpret notation, perform elimination steps, and explain what the solution means. A correct solution is not just a final answer; it is also a sequence of logical transformations. Think of it like following a recipe π³. If you skip a step, the result may still look okay on the surface, but the method may be wrong.
Gaussian elimination: the main solving strategy
Gaussian elimination is the standard method for solving linear systems. The idea is to use row operations to transform the system into an easier equivalent system, usually an upper triangular one. Once the system is triangular, you can solve it by back substitution.
The allowed elementary row operations are:
- swapping two rows,
- multiplying a row by a nonzero number,
- adding a multiple of one row to another row.
These operations do not change the solution set of the system. That means the new system is equivalent to the old one.
Letβs look at an example:
$$
$\begin{aligned}$
$2x+y-z&=1,\\$
$4x+5y-3z&=6,\\$
$-2x+5y-2z&=4.$
$\end{aligned}$
$$
Write the augmented matrix:
$$
$\left[\begin{array}{ccc|c}$
2&1&-1&1\\
4&5&-3&6\\
-2&5&-2&4
$\end{array}\right].$
$$
Use elimination to remove entries below the first pivot. The first pivot is the entry in the first row and first column. After row operations, the matrix becomes upper triangular, such as
$$
$\left[\begin{array}{ccc|c}$
2&1&-1&1\\
0&3&-1&4\\
0&6&-3&5
$\end{array}\right].$
$$
Then eliminate below the second pivot. After more steps, you may get
$$
$\left[\begin{array}{ccc|c}$
2&1&-1&1\\
0&3&-1&4\\
0&0&1&-1
$\end{array}\right].$
$$
Now back substitution starts from the last row. If $z=-1$, then the second row gives $3y-(-1)=4$, so $3y=3$ and $y=1$. The first row gives $2x+1-(-1)=1$, so $2x+2=1$ and $x=-\frac{1}{2}$.
This method is efficient because it turns a hard problem into a sequence of easier ones. In numerical analysis, that structure matters a lot. Real computers use elimination all the time because it scales better than solving each equation separately.
Why pivots matter and what can go wrong
A pivot is the key entry used to eliminate values below it. In exact arithmetic, elimination works neatly when pivots are nonzero. But in numerical analysis, the size of pivots matters too. If a pivot is very small, dividing by it can create large roundoff effects. This can make computed answers less reliable β οΈ.
For example, suppose a pivot is $0.0001$. Dividing by that number makes coefficients much larger, which may amplify small rounding errors from floating-point arithmetic. This is one reason why row swapping, called pivoting, is used.
Partial pivoting means choosing the largest available entry in the current column and swapping it into the pivot position. This usually improves numerical stability. It does not change the mathematical solution, but it can improve the accuracy of the computed result.
students should remember this distinction:
- mathematical correctness means the exact method is valid,
- numerical stability means the method behaves well on a computer with rounding.
This is a core theme in Numerical Analysis. A method can be theoretically correct but still produce poor results if it is unstable or sensitive to errors.
LU factorization: turning elimination into matrices
LU factorization is closely connected to Gaussian elimination. Instead of doing elimination every time from scratch, we factor the matrix $A$ into two easier matrices:
$$
$A=LU,$
$$
where $L$ is a lower triangular matrix and $U$ is an upper triangular matrix.
Why is this useful? Suppose you need to solve $A\mathbf{x}=\mathbf{b}$ for many different vectors $\mathbf{b}$. You can factor $A$ once, then solve two simpler systems:
$$
$L\mathbf{y}=\mathbf{b},\qquad U\mathbf{x}=\mathbf{y}.$
$$
The first system is solved by forward substitution, and the second by back substitution.
A simple example is
$$
$A=\begin{bmatrix}2&1\\4&3\end{bmatrix}.$
$$
One possible factorization is
$$
$L=\begin{bmatrix}1&0\\2&1\end{bmatrix},\quad$
$U=\begin{bmatrix}2&1\\0&1\end{bmatrix}.$
$$
Check the product:
$$
LU=$\begin{bmatrix}1$&0\\2&$1\end{bmatrix}$$\begin{bmatrix}2$&1\\0&$1\end{bmatrix}$=$\begin{bmatrix}2$&1\\4&$3\end{bmatrix}$=A.
$$
This factorization records the elimination process in matrix form. The multipliers used during elimination become entries in $L$, while the final triangular matrix becomes $U$.
LU factorization is useful because it saves work. If one matrix $A$ must be used with many right-hand sides, then factoring once is much faster than repeating elimination every time. This matters in science and engineering applications such as circuit analysis, structural modeling, and data fitting.
Connecting Midterm 1 to the bigger course topic
The topic Midterm 1 and Linear Systems I is about more than one test. It builds the foundation for later ideas in numerical methods. Linear systems appear in nearly every area of applied mathematics because many real-world problems can be approximated by linear equations.
Examples include:
- balancing forces in a bridge,
- analyzing electric circuits,
- estimating unknown parameters from data,
- computing discrete approximations to differential equations.
Midterm 1 usually checks whether students can move between different representations of the same problem: equations, matrices, augmented matrices, and factorizations. That flexibility is important because numerical analysis often uses the most convenient form for computation.
It also tests precision in language. For example, the words pivot, elimination, back substitution, forward substitution, and factorization each have a specific meaning. If students uses these terms correctly, it shows understanding of both the method and the math behind it.
Another important connection is error awareness. In exact algebra, elimination is straightforward. In numerical analysis, however, computers store numbers with limited precision. That means the way a method is implemented can affect the quality of the answer. Midterm 1 may ask you to interpret why a certain pivoting strategy is better or why two methods have different computational costs.
How to study for this lesson
A strong study plan should include both computation and explanation. Here is a practical approach for students π:
- Practice converting between a system and matrix form.
- Solve small systems using Gaussian elimination by hand.
- Identify pivots and explain each row operation.
- Perform back substitution carefully.
- Understand how LU factorization comes from elimination.
- Compare the cost and usefulness of elimination versus repeated solves with the same matrix.
- Review why partial pivoting improves reliability.
When you work problems, do not stop at the answer. Ask: Why is this step allowed? What did the row operation preserve? How does this relate to $A\mathbf{x}=\mathbf{b}$? Those questions help connect the procedure to the theory.
Conclusion
Midterm 1 in this unit is a checkpoint for understanding linear systems and the numerical methods used to solve them. Gaussian elimination turns a system into a simpler triangular form, and LU factorization organizes the same idea into reusable matrix factors. Together, these methods show the main goals of Numerical Analysis: create efficient algorithms, understand their behavior, and use them accurately.
If students can explain the notation, carry out elimination, describe pivoting, and connect $A=LU$ to solving $A\mathbf{x}=\mathbf{b}$, then students has the core ideas needed for this part of the course. The key is to see each method as part of a larger system of ideas, not just as a checklist of steps.
Study Notes
- A linear system can be written as $A\mathbf{x}=\mathbf{b}$.
- Gaussian elimination uses row operations to create an upper triangular system.
- The allowed row operations are row swapping, scaling by a nonzero number, and adding multiples of rows.
- A pivot is the key entry used to eliminate entries below it.
- Back substitution solves an upper triangular system from the bottom up.
- Small pivots can lead to numerical problems, so partial pivoting is often used.
- LU factorization writes $A=LU$, where $L$ is lower triangular and $U$ is upper triangular.
- With $A=LU$, solve $L\mathbf{y}=\mathbf{b}$ first, then solve $U\mathbf{x}=\mathbf{y}$.
- LU factorization is especially useful when the same matrix $A$ is used with many different right-hand sides.
- Midterm 1 connects computation, notation, and numerical reasoning in one topic.
