Engineering Mathematics · Linear Algebra
Linear Systems
In Engineering Mathematics because solving A x = b is the shared backbone behind calibration, regression, and many numerical engineering workflows.
Engineering problems often ask for unknown values that must satisfy several linear constraints at once. This topic packages that story into the system form A x = b and explains what a solution means.
- Engineering Mathematics
- Medium level
- 5 concepts
1Equations become one constraint map
A linear system is not just many equations written one under another. It is one transformation A applied to an unknown vector x, with the requirement that the result must equal the target vector b.
That framing matters because it turns algebra into structure. You can ask whether the target lies in the output space of A, whether the columns of A are redundant, and whether the constraints identify one answer or a whole family.
Figure. Each linear equation is a constraint line. A simultaneous solution must sit on every constraint at once, so the intersection is the candidate answer.
Write Ax=b
- Unknown vectorPut the unknowns in a fixed order, such as x=(x,y).
- RowsEach equation becomes one row of coefficients in A.
- TargetThe right-hand sides become the vector b.
Solve two constraints
Solve 2x+y=7 and x-y=1 by substitution after writing the system.
- From x-y=1y=x-1
- Substitute into 2x+y=72x+x-1=7
- 3x=8x=8/3
- y=x-1y=8/3-3/3=5/3
Pro tip. The vector solution is (8/3,5/3) in the unknown order (x,y).
Solve 3x + y = 11 and x - y = 1. What is (x, y)?
- (3, 2)
- (2, 3)
- (4, 1)
- (3, 1)
From x-y=1, x=y+1. Substitute: 3(y+1)+y=11 \Rightarrow 4y=8 \Rightarrow y=2, so x=3.
2Elimination rewrites constraints without changing the answer
Gaussian elimination is controlled rewriting. You combine equations to remove an unknown while keeping exactly the same solution set.
The safe mental model is not canceling symbols wherever they appear. It is replacing one row by a new row that follows from the old rows, so any solution of the original system still satisfies the rewritten system.
Figure. Subtract the second constraint from the first: (2a + b) − (a + b) = a and 7 − 5 = 2, so a = 2. Back-substitute into a + b = 5 to get b = 3. The pair is unchanged.
Eliminate one variable
- AlignChoose equations where one unknown can be removed by subtraction or scaling.
- RewriteReplace a row with a difference that still follows from the original rows.
- Back-substituteUse the simpler row to recover the remaining unknown.
Subtract constraints cleanly
Solve 2a+b=7 and a+b=5.
- (2a+b)-(a+b)a
- 7-52
- a2
- a+b=52+b=5, so b=3
Pro tip. The subtraction created a simpler equation without changing which pair (a,b) works.
From 3a + b = 10 and a + b = 4, eliminate b. Which reduced equation is correct?
- 2a = 6
- 4a = 14
- a = 4
- 2a = 14
Subtract the second from the first: (3a+b)-(a+b)=10-4 \Rightarrow 2a=6. Elimination preserves the solution set.
3A system can be unique, impossible, or underdetermined
Solving is not always about finding one point. Independent constraints can identify a unique solution, dependent constraints can leave many solutions, and contradictory constraints can leave no solution.
The matrix view explains the cases. The columns of A describe what targets are reachable; if b is outside that reachable set, the system is inconsistent.
Figure. The three geometric cases are crossing lines, parallel lines, and the same line. They correspond to one solution, no solution, and infinitely many solutions.
| Case | What it means |
|---|---|
| unique | constraints identify one unknown vector |
| many | constraints are consistent but leave a free direction |
| none | target conflicts with the constraint rows |
Detect a contradictory dependent system
Compare 2x+y=7 and 4x+2y=15.
- Second left side4x+2y=2(2x+y)
- If first equation holds2(2x+y)=2\cdot7=14
- Second equation demands4x+2y=15
- 14\ne15no solution
Pro tip. Dependent left sides must scale the right side by the same factor; here they do not.
Compare x + 2y = 5 and 2x + 4y = 9. What kind of system is this?
- Inconsistent: the second equation contradicts the first
- Unique solution because there are two equations
- Underdetermined with infinitely many solutions
- Dependent with the same line twice
Twice the first equation would be 2x+4y=10, but the second says =9, so no point satisfies both.
4Normal equations are linear systems for fit parameters
Least squares turns a fitting problem into a linear system in the model parameters. For a line \hat y=a+bt, the unknown vector is \theta=(a,b).
The normal-equation form X^TX\theta=X^Ty appears because the best fit makes the residual orthogonal to the columns of the design matrix. In a tiny example it is still just a 2 by 2 system to solve.
The normal-equation ledger turns a fitting problem into the parameter solution a=1, b=2.
From fit to system
- Design matrixUse one column for the intercept and one for t.
- Normal equationsCompute or receive X^TX\theta=X^Ty.
- Solve parametersSolve the resulting system for a and b.
A tiny normal-equation solve
For points (0,1), (1,3), and (2,5), the line model \hat y=a+bt gives normal equations \begin{bmatrix}3&3\\3&5\end{bmatrix}\begin{bmatrix}a\\b\end{bmatrix}=\begin{bmatrix}9\\13\end{bmatrix}. Solve them.
- Equations3a+3b=9 and 3a+5b=13
- Subtract first from second2b=4
- b2
- 3a+3b=93a+6=9, so a=1
Pro tip. The fitted line is \hat y=1+2t, which matches the three points exactly in this toy setup.
For a tiny normal system 2a + b = 4 and a + 2b = 5, what is (a, b)?
- (1, 2)
- (2, 1)
- (0, 2)
- (1, 1)
From the first, b=4-2a. Substitute: a+2(4-2a)=5 \Rightarrow a+8-4a=5 \Rightarrow -3a=-3 \Rightarrow a=1, so b=2.
5A solution is checked by its residual
After solving, the most direct check is to plug the answer back into Ax=b. The difference Ax-b is the residual vector.
For an exact linear system, a correct solution has zero residual. For a least-squares fit, the residual is usually not zero, but its structure still tells you how the fit failed.
Figure. Plug x = 8/3, y = 5/3 back into 2x + y = 7 and x − y = 1. Both sides match, so the residual Ax − b is (0, 0).
Check a candidate
- MultiplyCompute A\hat x using the candidate solution.
- SubtractForm the residual A\hat x-b.
- InterpretZero means exact satisfaction; nonzero means remaining error or inconsistency.
Verify the earlier solution
Check x=8/3, y=5/3 in the system 2x+y=7, x-y=1.
- 2(8/3)+5/316/3+5/3=21/3=7
- 8/3-5/33/3=1
- A\hat x-b(7,1)-(7,1)=(0,0)
Pro tip. A zero residual is the algebraic receipt that both constraints were satisfied.
Candidate (x, y)=(2, 1) for x+3y=5 and 2x-y=3. What is the residual vector (Ax-b)?
- (0, 0)
- (1, 0)
- (0, 1)
- (2, 1)
2+3\cdot1=5 and 2\cdot2-1=3, so both equations hold and the residual is zero.
Notes
- A linear system collects several linear equations in the same unknown vector.
- A system may have one solution, no solution, or infinitely many solutions depending on the geometry of the constraints.
Formulas
- A x = b is the matrix form of a linear system.
- A square 2 by 2 system has a unique solution when its two constraint rows are independent.
- Least-squares normal equations have the form X^T X\theta = X^T y.
Exam traps & shortcuts
- Translate each equation into a row and each unknown into a column before reasoning about solvability.
- A row operation changes the equation list but should preserve the same solution set.
- When a fitted model produces normal equations, the unknown vector is the parameter vector, not the original data row.
Recap
Read a system as one map plus one target.
- Form
- A x = b means the unknown vector must satisfy all listed linear constraints at once.
- Cases
- Consistency and uniqueness depend on how the columns of A relate to the target b.
- Elimination
- Row operations are controlled rewrites that preserve the solution set.
- Least squares
- Normal equations are linear systems whose unknowns are fit parameters.
Practise Linear Systems
Reading is free and needs no account. Practice, mocks and progress live in the app.
- A 5-question practice set that ends the chapter
- 5 quick checks with worked explanations
- Timed mocks scored with the real marking scheme
- Readiness tracked per topic, kept on your device