assignment+1+solutions
assignment+1+solutions
Assignment solution
September 13, 2022
1 Matrix inverse
1. Find inverse of the
matrix.
1 0 1 2
−1 1 2 0
A= −2 0 1 2
0 0 0 1
1 0 −1 0
1 −3 3 −3 12
A−1 =
3 2 0 1 −6
0 0 0 3
Python code
mat_A = np.array([[1, 0, 1, 2], [-1, 1, 2, 0], [-2, 0, 1, 2], [0, 0, 0, 1]])
A_inverse = np.linalg.inv(mat_A)
print(A_inverse)
2 Change of basis
1. Determine the component vector of the vector V = (1, 7, 7) in R2 relative
to the desired Basis B = {(1, −6, 3), (0, 5, −1), (3, −1, −1)}.
1 1 0 3 1 0 3 a
V = 7 = a −6 + b 5 + c −1 = −6 5 −1 b
7 3 −1 −1 3 −1 −1 c
−1
a 1 0 3 1 4
b = −6 5 −1 7 = 6
c 3 −1 −1 7 −1
1
The characteristic polynomial: det(A − tI) = −(t − 1)2 (t − 2).
The eigenvalues are λ = 1 with multiplicity 2. and λ = 2 with multiplicity
1.
Eigenvectors
for
λ = 1 can be
found
by
finding
the null space of A − I =
3 −3 −3 1 1
3 −3 −3 which are: 1 and 0
−1 1 1 0 1
Eigenvector
forλ = 2 can be by finding the null space of A − 2I =
found
2 −3 −3 −3
3 −4 −3 which is: −3
−1 1 0 1
These eignevectors are linearly independent.
We construct matrix S by using the eigenvectors as columns.
1 1 −3
S = 1 0 −3
0 1 1
The diagonal matrix is constructed using eignevalues as diagonal entries
1 0 0
D = 0 1 0
0 0 2
The matrix is diagonalized as: A = SDS −1 .
2. For a matrix A of size n × n you are told that all its n eigen vectors are
independent. Let S denote the matrix whose columns are the n eigen
vectors of A.
(a) Is A Invertible?
(b) Is A Diagonalizable?
(c) Is S Invertible?
(d) Is S Diagonalizable?
Your answer can be “yes”,“no” or “depends”. For each one, give argu-
ments and/or examples to support your answer.
1 0
(a) Is A Invertible? Depends. A = has eigen vectors [1,0] and
0 0
[0,1] but is not invertible.
1 0
A= has eigen vectors [1,0] and [0,1] and is invertible since
0 2
det(A) = 2.
(b) Is A Diagonalizable?
Yes, indeed we can write:
2
AS = [λ1 S1 , λ2 S2 , . . . , λn SN ]
AS = SΛ
−1
S AS = Λ