quiz1_solution
quiz1_solution
Solution
The given matrix equation can be written as a system of linear equations by
interpreting each row of the matrix multiplication:
3x1 − x2 + 2x3 = 2,
4x1 + 3x2 + 7x3 = −1,
−2x1 + x2 + 5x3 = 4.
Thus, the system of linear equations is:
3x1 − x2 + 2x3 = 2,
4x1 + 3x2 + 7x3 = −1,
−2x1 + x2 + 5x3 = 4.
Solution
Let B be a matrix of order m × n. For BA to be defined, the number of columns
of B must equal the number of rows of A. Thus, we have:
n = p,
1
Habib University Linear Algebra
Spring 2025 Quiz 1 Solutions
Problem 3: Find matrices A, x, and b that express the given system of linear equations
as a single matrix equation Ax = b.
4x1 − 3x3 + x4 = 1,
5x1 + x2 − 8x4 = 3,
2x1 − 5x2 + 9x3 − x4 = 0,
3x2 − x3 + 7x4 = 2.
Solution
The given system of linear equations can be written in the form Ax = b, where:
4 0 −3 1 x1 1
5 1 0 −8 x2 3
A= 2 −5 9 −1 , x = x3 , b = 0 .
0 3 −1 7 x4 2
0 3 −1 7 x4 2
Problem 4: If A and B are two square matrices of the same size, then find the condition
such that:
(A + B)2 = A2 + B 2 + 2AB.
Solution
To determine the condition, we expand (A + B)2 using matrix multiplication:
AB + BA = 2AB.
2
Habib University Linear Algebra
Spring 2025 Quiz 1 Solutions
Solution
The matrix D = diag(d1 , d2 , . . . , dm ) is a diagonal m × m matrix with d1 , d2 , . . . , dm
on the diagonal and zero elsewhere:
d1 0 · · · 0
0 d2 · · · 0
D = .. .. . . . .
. . . ..
0 0 · · · dm
Let A be an m × n matrix:
a11 a12 ··· a1n
a21 a22 ··· a2n
A = .. .. .
.. ..
. . . .
am1 am2 · · · amn
3
Habib University Linear Algebra
Spring 2025 Quiz 1 Solutions
Solution
The matrix D = diag(d1 , d2 , . . . , dm ) is a diagonal m × m matrix with d1 , d2 , . . . , dm
on the diagonal and zero elsewhere:
d1 0 · · · 0
0 d2 · · · 0
D = .. .. . . . .
. . . ..
0 0 · · · dm
Let A be an n × m matrix:
a11 a12 · · · a1m
a21 a22 · · · a2m
A = .. .. .
.. ..
. . . .
an1 an2 · · · anm
4
Habib University Linear Algebra
Spring 2025 Quiz 1 Solutions
Solution
Since A and B are both 6 × 8 matrices, their sum A + B is also a 6 × 8 matrix.
Matrix multiplication C(A + B) is defined only if the number of columns in C
matches the number of rows in A + B, which holds true in the given case as 6 = 6.
The resulting matrix will have size:
Solution
Since A and B are both 4 × 5 matrices, their sum A + B is also a 4 × 5 matrix.
Matrix multiplication C(A + B) is defined only if the number of columns in C
matches the number of rows in A + B, which holds true in the given case as 4 = 4.
The resulting matrix will have size:
Problem 9: Find the augmented matrix for the following system of linear equations:
x1 − 2x2 + x3 − 4x4 = 1,
x1 + 3x2 + 7x3 + 2x4 = 2,
x1 − 12x2 − 11x3 − 16x4 = 5.
Solution
The given system of linear equations can be written as an augmented matrix by
extracting the coefficients of x1 , x2 , x3 , x4 and placing the constants on the right as
the last column.
The augmented matrix is:
1 −2 1 −4 1
1 3 7 2 2 .
1 −12 −11 −16 5
5
Habib University Linear Algebra
Spring 2025 Quiz 1 Solutions
Problem 10: Show that if AB and BA are both defined, then AB and BA are square
matrices.
Solution
Let A be an m × n matrix and B be an p × q matrix.
For AB to be defined,
implies p = n.
Similarly, for BA to be defined,
the number of rows of left matrix × the number of columns of the right matrix.