Table of Contents
Problem 1 .......................................................................................................................................... 1
Problem 2 .......................................................................................................................................... 1
Problem 3 .......................................................................................................................................... 2
Problem 4 .......................................................................................................................................... 3
Problem 1
11 + 22
ans =
33
Problem 2
A = [1 3 1 ; 3 4 4 ; -1 -2 5]
b = [-9 ; 52 ; 18]
A \ b
M = [A b]
rref(M)
%The last column of M is the unique solution because the last column
%represents the solution of the linear system. It is unique because
%there are no free variables.
A =
1
3
-1
3
4
-2
1
4
5
b =
-9
52
18
ans =
32
1
-15
4
M =
1
3
-1
3
4
-2
1
4
5
-9
52
18
0
1
0
0
0
1
32
-15
4
ans =
1
0
0
Problem 3
A = [7 8; -3 9; 2 -8]
b = [59; 12; -14]
M = [A b]
rref(M)
%x1 = 5
%x2 = 3
%The solution is not the augmented column of the RREF in this case
%because there is a zero row on the bottom.
A =
7
-3
2
8
9
-8
b =
59
12
-14
M =
7
-3
2
8
9
-8
59
12
-14
2
ans =
1
0
0
0
1
0
5
3
0
Problem 4
A = [1 3 1 ; 3 4 4]
b = [-9; 52]
M = [A b]
rref(M)
%There must be infinitely many solutions because there are more
%variables than equations in the system, there has to be a free
%variable.
A =
1
3
3
4
1
4
3
4
1
4
b =
-9
52
M =
1
3
-9
52
ans =
1.0000
0
0
1.0000
1.6000
-0.2000
38.4000
-15.8000
Published with MATLAB® R2025a
3