Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering...

39
Bachelor Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems February 2015 Departament de Matem` atica Aplicada 2 Universitat Polit` ecnica de Catalunya

Transcript of Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering...

Page 1: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

Bachelor Degree in Informatics Engineering

Barcelona School of Informatics

Mathematics 1

Part II: Linear Algebra

Exercises and problems

February 2015

Departament de Matematica Aplicada 2

Universitat Politecnica de Catalunya

Page 2: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

The problems of this collection were initially gathered by Anna de Mier and Montserrat Mau-

reso. Many of them were taken from the problem sets of several courses taught over the years

by the members of the Departament de Matematica Aplicada 2. Other exercises came from the

bibliography of the course or from other texts, and some of them were new. Since Mathematics

1 was first taught in 2010 several problems have been modified or rewritten by the professors

involved in the teaching of the course.

We would like to acknowledge the assistance of the scholar Gabriel Bernardino in the writing

of the solutions.

Translation by Josep Elgueta and the scholar Bernat Coma.

Page 3: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

Contents

5 Matrices, systems of linear equations and determinants 15.1 Matrix algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.2 Systems of linear equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45.3 Determinants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

6 Vector spaces 8

7 Linear maps 16

8 Diagonalization 23

Review exercises 27

Page 4: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems
Page 5: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

5Matrices, systems of linearequations and determinants

Unless otherwise indicated, we always work in the field R of real numbers.

5.1 Matrix algebra

5.1 Given the matrices

A =

1 2 4

−3 0 −1

2 1 2

, B =

2 0 0

1 −4 3

−1 3 2

, C =

2 1 0

1 0 3

−1 0 2

4 5 −1

compute: 1) 3A; 2) 3A−B; 3) AB; 4) BA; 5) C(3A− 2B).

5.2 Compute the products (1 2 − 3)

2

1

5

and

2

1

5

(1 2 − 3).

5.3 Let A and B be matrices such that AB is a square matrix. Show that the product BA is

well defined.

5.4 For the following matrices A and B, give the elements c13 and c22 of the matrix C = AB

without computing all the elements of C.

A =

(1 2 1

−3 0 −1

), B =

2 0 0

1 −4 3

−1 3 2

.

5.5 A company makes bags and suitcases in two different factories. The table below gives the

cost, in thousands of euros, of manufacturing each product in each factory:

Factory 1 Factory 2

Bags 135 150

Suitcases 627 681

Page 6: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

2 Chapter 5. Matrices, systems of linear equations and determinants

Answer the following questions using matrix operations.

1) Knowing that the personnel costs represent 2/3 of the total cost, find the matrix that

gives the personnel cost of each product in each factory.

2) Find the matrix that gives the cost of the material of each product in each factory,

assuming that, in addition to the personnel and material costs, there is a cost of 20.000

euros for each product in each factory.

5.6 In this exercise we want to find a formula giving the successive powers of a diagonal

matrix.

a) Compute A2, A3 and A5 if

A =

2 0 0

0 −1 0

0 0 3

.

b) Compute A32.

c) Let D be a diagonal n×n matrix whose diagonal entries are λ1, λ2, . . . , λn. Make a guess

about Dr, for r ∈ Z, r ≥ 1, and prove it by induction.

5.7 Let A =

(1 −2

−2 3

)and B =

(−2 1

1 1

). Compute (AB)t and BtAt. Observe that AB

can be a non-symmetric matrix even when both A and B are symmetric.

5.8 Give an example of two 2× 2 matrices A and B such that (AB)t 6= AtBt.

5.9 Let I be the identity matrix and O the null matrix ofM2×2(R). Find matricesA,B,C,D,E ∈M2×2(R) such that

1) A2 = I and A 6= I;

2) B2 = O and B 6= O;

3) C2 = C and C 6= I,O;

4) DE = O but E 6= D and ED 6= O.

5.10 Let A and B be two symmetric matrices of the same type. Prove that AB is a symmetric

matrix if and only if A and B commute.

5.11 Do the following equalities hold for all matrices A,B ∈Mn(R)? If not, give a condition

on A and B ensuring that the equations hold.

1) (A+B)2 = A2 +B2 + 2AB; 2) (A−B)(A+B) = A2 −B2.

Page 7: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

5.1. Matrix algebra 3

5.12 Let A and B be square matrices of the same type. A is said to be similar to B if there

exists an invertible matrix P such that B = P−1AP . If A is similar to B, prove:

1) B is similar to A. In general we say that A and B are similar.

2) The relation “being similar” is an equivalence relation.

3) A is invertible if and only if B is invertible.

4) At is similar to Bt.

5) If An = O and C is an invertible matrix of the same type as A, then (C−1AC)n = O.

5.13 Find a matrix in row echelon form equivalent to each of the following matrices. Give

the rank of the matrix in each case.

1)

1 0 2 3

2 1 1 3

−1 2 0 0

2)

−3 1

2 0

6 4

3)

5 11 6

2 1 4

3 −2 8

0 0 4

4)

0 1 2 3 4

−1 0 1 2 3

−2 −1 0 1 2

−3 −2 −1 0 1

5.14 Find the inverse of the following elementary matrices.

1)

(0 1

1 0

)

2)

(5 0

0 1

)3)

0 0 1

0 1 0

1 0 0

4)

1 0 0

0 1 0

0 −3 1

5)

k 0 0

0 1 0

0 0 1

, k 6= 0

5.15 Using the Gauss-Jordan method, find, if it exists, the inverse of each of the following

matrices.

1)

(1 2

3 5

)2)

3 1 5

2 4 1

−4 2 −9

3)

−2 3 −1 −1

−1 1 1 1

−1 −1 1 2

3 1 −2 −4

4) A = (ai,j)4×4, such that ai,j = 1 if |i− j| ≤ 1, and ai,j = 0 otherwise.

5) A = (ai,j)4×4, such that ai,j = 2j−1 if i ≥ j, and ai,j = 0 otherwise.

6) A = (ai,j)4×4, such that ai,i = k, ai,j = 1 if i− j = 1, and ai,j = 0 otherwise.

Page 8: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

4 Chapter 5. Matrices, systems of linear equations and determinants

5.2 Systems of linear equations

5.16 Which of the following equations are linear in x, y and z?

1) x+ 3xy + 2z = 2;

2) y + x+√

2z = e2;

3) x− 4y + 3z1/2 = 0;

4) y = z sin π4 − 2y + 3;

5) z + x− y−1 + 4 = 0;

6) x = z.

5.17 Find a system of linear equations for each of the following augmented matrices.

1)

1 0 3 2

2 1 1 3

0 −1 2 4

2)

−1 5 −2

1 1 0

1 −1 1

3)

(1 2 3 4 5

1/3 1/4 1/5 1/2 1

)

4)

1 0 0 0 1

0 1 0 0 2

0 0 1 0 3

1 0 0 1 4

5.18 Answer the following questions. Justify your answers.

1) What is the rank of the system matrix of a determined consistent system with 5 equations

and 4 unknowns? What about if the system is underdetermined?

2) How many equations are needed at least to have an underdetermined consistent system

with 2 degrees of freedom and rank 3? How many unknowns would this system have?

3) Is it possible to have a determined consistent system with 7 equations and 10 unknowns?

4) Can a system with fewer equations than unknowns be inconsistent?

5) Give a determined consistent system, an underdetermined consistent system and an in-

consistent system, each with 3 unknowns and 4 equations.

5.19 Solve the following systems of linear equations with coefficients in Z2. Use Gaussian

elimination and give the solution in parametric form.

1)

x+ y = 1

x+ z = 0

x+ y + z = 1

2)

x+ y = 1

y + z = 1

x+ z = 1

3)

x+ y = 0

y + z = 0

x+ z = 0

Page 9: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

5.2. Systems of linear equations 5

5.20 Solve the following systems of linear equations. Use Gaussian elimination and give the

solution in parametric form.

1)

x+ y + 2z = 8

−x− 2y + 3z = 1

3x− 7y + 4z = 10

3y − 2z = −1

3)

x− y + 2z − w = −1

2x+ y − 2z − 2w = −2

−x+ 2y − 4z + w = 1

3x− 3w = −3

2)

x− y + 2z = 3

2x− 2y + 5z = 4

x+ 2y − z = −3

2y + 2z = 1

4)

x1 + 3x2 − 2x3 + 2x5 = 0

2x1 + 6x2 − 5x3 − 2x4 + 4x5 − 3x6 = −1

5x3 + 10x4 + 15x6 = 5

2x1 + 6x2 + 8x4 + 4x5 + 18x6 = 6

5.21 Solve the following homogeneous systems of linear equations. Use Gaussian elimination

and give the solution in parametric form.

1)

2x+ 2y + 2z = 0

−2x+ 5y + 2z = 0

−7x+ 7y + z = 0

3)

x2 − 3x3 + x4 = 0

x1 + x2 − x3 + 4x4 = 0

−2x1 − 2x2 + 2x3 − 8x4 = 0

2)

2x− 4y + z + w = 0

x− 5y + 2z = 0

−2y − 2z − w = 0

x+ 3y + w = 0

x− 2y − z + w = 0

4)

2x1 + 2x2 − x3 + x5 = 0

−x1 − x2 + 2x3 − 3x4 + x5 = 0

x1 + x2 + x3 + 2x5 = 0

2x3 + 2x4 + 2x5 = 0

5.22 Discus the following systems of linear equations according to the values of the parameters

(assumed to be real).

1)

x+ y + 2z = a

x+ z = b

2x+ y + 3z = c

4)

x+ 2y − 3z = 4

3x− y + 5z = 2

4x+ y + (a2 − 14)z = a+ 2

2)

bx+ y + z = b2

x− y + z = 1

3x− y − z = 1

6x− y + z = 3b

5)

x+ y = k

ax+ by = k2

a2x+ b2y = k3

3)

ax+ y − z + t− u = 0

x+ ay + z − t+ u = 0

−x+ y + az + t− u = 0

x− y + z + at+ u = 0

−x+ y − z + t+ au = 0

Page 10: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

6 Chapter 5. Matrices, systems of linear equations and determinants

5.3 Determinants

5.23 Assuming that

∣∣∣∣∣∣a b c

d e f

g h i

∣∣∣∣∣∣ = 5, compute the following determinants.

1)

∣∣∣∣∣∣d e f

g h i

a b c

∣∣∣∣∣∣2)

∣∣∣∣∣∣−a −b −c2d 2e 2f

−g −h −i

∣∣∣∣∣∣

3)

∣∣∣∣∣∣a+ d b+ e c+ f

d e f

g h i

∣∣∣∣∣∣4)

∣∣∣∣∣∣a b c

d− 3a e− 3b f − 3c

2g 2h 2i

∣∣∣∣∣∣5.24 For which values of λ is the determinant of the following matrices equal to 0?

1)

(λ− 1 −2

1 λ− 4

)2)

λ− 6 0 0

0 λ −1

0 4 λ− 4

5.25 Compute the following determinants.

1)

∣∣∣∣ 5 15

10 −20

∣∣∣∣

2)

∣∣∣∣∣∣2 1 2

0 3 −1

4 1 1

∣∣∣∣∣∣

3)

∣∣∣∣∣∣3 −1 5

−1 2 1

−2 4 3

∣∣∣∣∣∣

4)

∣∣∣∣∣∣4 16 0

12 −8 8

16 20 −4

∣∣∣∣∣∣5)

∣∣∣∣∣∣0 2 1

−1 3 0

2 4 3

∣∣∣∣∣∣6)

∣∣∣∣∣∣∣∣−1 2 1 2

1 2 4 1

2 0 −1 3

3 2 −1 0

∣∣∣∣∣∣∣∣

7)

∣∣∣∣∣∣∣∣0 −3 8 2

8 1 −1 6

−4 6 0 9

−7 0 0 14

∣∣∣∣∣∣∣∣

8)

∣∣∣∣∣∣∣∣∣∣

1 −1 8 4 2

2 6 0 −4 3

2 0 2 6 2

0 2 8 0 0

0 1 1 2 2

∣∣∣∣∣∣∣∣∣∣5.26 Prove the following property.∣∣∣∣∣∣

a11 a12 a13a21 a22 a23a31 a32 a33

∣∣∣∣∣∣+

∣∣∣∣∣∣b11 a12 a13b21 a22 a23b31 a32 a33

∣∣∣∣∣∣ =

∣∣∣∣∣∣a11 + b11 a12 a13a21 + b21 a22 a23a31 + b31 a32 a33

∣∣∣∣∣∣5.27 For any matrix A, let B be the matrix obtained from A by adding to some row a multiple

of another one. Prove that det(B) = det(A).

Page 11: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

5.3. Determinants 7

5.28 Let A and B be 3× 3 matrices such that det(A) = 10 and det(B) = 12. Compute

1) det(AB), 2) det(A4), 3) det(2B), 4) det(At), 5) det(A−1).

5.29 Prove that ∣∣∣∣∣∣∣∣a 1 1 1

1 a 1 1

1 1 a 1

1 1 1 a

∣∣∣∣∣∣∣∣ = (a+ 3)(a− 1)3.

Page 12: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

6Vector spaces

A vector space over a field K consists of

1) a non-empty set E,

2) a binary operation E × E → E called addition and denoted +, and

3) a map K× E → E called scalar multiplication and denoted ·,

satisfying the following eight properties for each u, v, w ∈ E and each λ, µ ∈ K:

e1) u+ (v + w) = (u+ v) + w (associative law);

e2) u+ v = v + u (commutative law);

e3) there exists a unique element 0E ∈ E such that u+ 0E = u (zero vector);

e4) for each u ∈ E there exists a unique u′ ∈ E such that u+ u′ = 0E (additive inverse);

e5) λ(µu) = (λµ)u;

e6) λ(u+ v) = λu+ λv;

e7) (λ+ µ)u = λu+ µu;

e8) 1u = u, where 1 denotes the multiplicative identity of K.

(Note: in most cases, the field K will be R; other fields that may appear are Q and Zp.)

Exercises

6.1 Let u =

3

−1

2

, v =

4

0

−8

and w =

6

−1

−4

be vectors of R3. Compute

1) u− v; 2) 5v + 3w; 3) 5(v + 3w); 4) (2w − u)− 3(2v + u).

Page 13: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

9

6.2 Draw the following vectors of R2.

1) v1 =

(2

6

); 2) v2 =

(−4

−8

); 3) v3 =

(−1

5

); 4) v4 =

(3

0

).

6.3 For the vectors in the previous exercise, compute graphically the vectors v1 + v2, v1 − v3and v2 − v4 and check your answers algebraically.

6.4 Let u, v, w be elements of a vector space and let α, β, γ be elements of the corresponding

field of scalars, with α 6= 0. Assuming that the relation αu + βv + γw = 0 holds, write the

vectors u, u− v and u+ α−1βv in terms of v and w.

6.5 Let P (R)e be the set of all polynomials with coefficients in R and with only even powers

of x. Determine if P (R)e is a vector space with the usual addition and scalar multiplication of

polynomials. (Assume that the polynomial 0 has degree 0.)

6.6 Let F(R) be the set of all functions f : R → R. Given two functions f, g ∈ F(R) and

λ ∈ R, let us define the functions f + g and λf by

(f + g)(x) = f(x) + g(x),

(λf)(x) = λf(x).

Prove that F(R) is a R-vector space with these operations.

6.7 Which of the following sets are vector subspaces over R? (Justify your answers.)

E1 = {(x

y

)∈ R2 : x+ πy = 0}, E5 = {

x

y

z

t

∈ R4 : x+ y + z + t = 0, x− t = 0},

E2 = {

xyz

∈ R3 : x+ z = π}, E6 = {(x

y

)∈ R2 : x2 + 2xy + y2 = 0},

E3 = {

xyz

∈ R3 : xy = 0}, E7 = {

a+ b

a− 2b

c

2a+ c

∈ R4 : a, b, c ∈ R},

E4 = {(x

y

)∈ R2 : x ∈ Q}, E8 = {

a2

a

b+ a

2 + a

∈ R4 : a, b ∈ R}.

Page 14: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

10 Chapter 6. Vector spaces

6.8 Let P (R) be the vector space of all polynomials in x with coefficients in R. Which of the

following subsets are vector subspaces of P (R)? (Justify your answers.)

F1 = {a3x3 + a2x2 + a1x+ a0 ∈ P (R) : a2 = a0}

F2 = {p(x) ∈ P (R) : p(x) has degree 3}F3 = {p(x) ∈ P (R) : p(x) has even degree}F4 = {p(x) ∈ P (R) : p(1) = 0}F5 = {p(x) ∈ P (R) : p(0) = 1}F6 = {p(x) ∈ P (R) : p′(5) = 0}

6.9 Let Mn×m(R) be the vector space of all n×m matrices with coefficients in R. Which of

the following subsets are vector subspaces of Mn×m(R)? (Justify your answers.)

M1 =

{(a b

c d

)∈M2×2(R) :

(a b

c d

)(2 1

1 1

)=

(2 1

1 1

)(a b

c d

)}M2 = {A ∈Mn×m(R) : A = At}M3 = {A ∈Mn×m(R) : a1 i = 0 ∀i ∈ [m]}M4 = {A ∈Mn×m(R) : a1 i = 1 ∀i ∈ [m]}M5 = {A ∈Mn×m(R) : AB = 0} (where B is a fixed matrix)

6.10 Let T ⊂ R4. Prove that the vector u below can be written as a linear combination of

the vectors in T in at least two different ways.

T = {

1

0

−1

0

,

1

1

1

0

,

0

1

1

1

,

0

1

2

0

}, u =

0

3

5

1

6.11 For which values of the parameter a can the vector u ∈ R3 be written as a linear

combination of the vectors in T?

u =

1

5

a

, T = {

3

1

−1

,

0

7

−1

,

−1

2

0

}

6.12 Give the values of the parameters a and b for which the matrix

(1 0

a b

)is a linear

combination of

(1 4

−5 2

)and

(1 2

3 −1

).

6.13 Given the vectors u =

1

1

2

and v =

0

1

1

of R3, find a condition on the components of

a vector

xyz

which ensures that this vector is in the subspace spanned by {u, v}.

Page 15: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

11

6.14 Give the form of a generic polynomial in P (R) that belongs to the vector subspace

spanned by the set {1 + x, x2}.

6.15 Let F = 〈

1

−1

1

,

0

1

−1

〉 and G = 〈

1

0

0

,

1

−2

2

〉 be subspaces of R3.

1) Prove that F = G.

2) Let e =

9√2− 1

1−√

2

. Prove that e ∈ F and express it as a linear combination of the two

families of vectors that span F .

6.16 Determine whether the following sets of vectors are linearly independent in the respective

vector spaces.

1) {

1

2

3

,

3

6

8

} in R3;

2) {

2

−3

1

,

3

−1

5

,

1

−4

3

} in R3;

3) {

5

4

3

,

3

3

2

,

8

1

3

} in R3;

4) {

4

−5

2

6

,

2

2

−1

3

,

6

−3

3

9

,

4

−1

5

6

} in

R4;

5) {

1

0

0

2

5

,

0

1

0

3

4

,

0

0

1

4

7

,

2

−3

4

11

12

} in R5.

6.17 Determine whether the following vectors in three-dimensional space are coplanar, collinear,

or neither.

1) {

2

−2

0

,

6

1

4

,

2

0

−4

};

2) {

−6

7

2

,

3

2

4

,

4

−1

2

};

3) {

−1

2

3

,

2

−4

−6

,

−3

6

0

};

4) {

4

6

8

,

2

3

4

,

−2

−3

−4

}.

6.18 Let us consider the vectors

1

1

0

a

,

3

−1

b

−1

and

−3

5

a

−4

in the vector space R4. Determine

a and b so that they are linearly dependent vectors, and in that case express the vector 0R4 as

a non-trivial linear combination of them.

Page 16: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

12 Chapter 6. Vector spaces

6.19 Let E be a R-vector space and let u, v, w be any three vectors in E. Prove that the set

{u− v, v − w,w − u} is linearly dependent.

6.20 Prove that the following matrices A, B and C are linearly independent as vectors in

M2×3(R).

A =

(0 1 −2

1 1 1

), B =

(1 1 −2

0 1 1

), C =

(−1 1 −2

3 −2 0

).

Prove that for any λ the matrix (λ 2 −4

2− λ 2 2

)is a linear combination of A and B.

6.21 Prove that the polynomials x2 + 2x − 1, x2 + 1 and x2 + x are linearly dependent in

P (R).

6.22 If {e1, e2, . . . , er} is a family of linearly dependent vectors in some vector space, is it true

that any vector ei can be written as a linear combination of the other vectors? Prove it or give

a counterexample.

6.23 Determine whether the following statements about a family of vectors in a vector space

E are true, proving them when they are true and giving a counterexample otherwise.

1) If {e1, . . . , er} are linearly independent and v 6= ei for each i, then the set {e1, . . . , er, v}is linearly independent.

2) If {e1, . . . , er} are linearly independent and v 6∈ 〈e1, . . . , er〉, then {e1, . . . , er, v} is linearly

independent.

3) If {e1, . . . , er} spans E and v 6= ei for each i, then {e1, . . . , er, v} also spans E.

4) If {e1, . . . , er} spans E and er ∈ 〈e1, . . . , er−1〉, then {e1, . . . , er−1} also spans E.

5) Every set with only one vector is linearly independent.

6.24 Let us consider the set of vectors {

1

1

0

0

,

0

0

1

1

,

1

0

0

4

,

0

0

0

2

}.

1) Prove that they are a basis of R4.

2) Give the coordinates of the vector

1

0

2

−3

in this basis.

Page 17: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

13

3) Give the coordinates of an arbitrary vector

x

y

z

t

in this basis.

6.25 Let B =

{(1 0

0 0

),

(1 1

0 0

),

(1 2

1 0

),

(0 0

0 1

)}. Prove that B is a basis of M2(R).

Give the coordinates of A =

(1 3

3 1

)in this basis.

6.26 Let P3(R) be the vector space of all polynomials of degree at most 3. Prove that the

polynomials 1 +x,−1 +x, 1 +x2 and 1−x+x3 form a basis of P3(R) and give the coordinates

of the polynomial x3 + 3x2 + 6x− 5 in this basis.

6.27 Let F = 〈

0

1

1

,

4

1

−1

,

2

1

0

〉 in R3. Give a basis of F and find the condition that the

components of

xyz

must satisfy for this vector to belong to F .

6.28 Consider the following subspaces of R4.

F = 〈

1

−1

1

0

,

0

1

−1

1

,

1

0

0

−1

〉, G = 〈

1

0

0

0

,

1

−2

2

0

,

0

1

−1

1

〉.

Prove that F = G and that the respective spanning sets are bases. Do the vectors

3√2− 1

1−√

2

0

and

0

1

0

0

belong to F? If so, give their coordinates in the two bases.

6.29 Let {v1, v2, v3} be a basis of a vector space E. Prove that the set {v1 + 2v2, 2v2 +

3v3, 3v3 + v1} is also a basis of E.

6.30 Give a basis of the subspace E of R5 and complete it to a basis of R5 for

E = {

x1x2x3x4x5

∈ R5 : x3 = x1 + x2 − x4, x5 = x2 − x1}.

Page 18: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

14 Chapter 6. Vector spaces

6.31 Let us consider the vectors in M2(R)(1 4

−1 10

),

(6 10

1 0

),

(2 2

1 1

).

Prove that they are linearly independent and give a vector that together with them forms a

basis of M2(R).

6.32 For which values of λ the vectors

λ

0

1

λ

,

λ

1

2

1

,

1

0

λ

λ

span a vector subspace of R4 of

dimension 2?

6.33 In each case, give a basis and the dimension of the spaces E, F and E ∩ F :

1) E = {

xyz

∈ R3 : 2x = 2y = z} and F = {

xyz

∈ R3 : x + y = z, 3x + y + z = 0} as

subspaces of R3.

2) E = 〈

1

1

−1

,

2

0

−1

,

0

2

−1

〉 and F = 〈

1

0

−1

,

2

3

0

,

4

3

−2

〉 as subspaces of R3.

3) E = {

a

a+ 3b

2a− bc

: a, b, c ∈ R} and F = {

−2a

b

0

3b

: a, b ∈ R} as subspaces of R4.

4) E =

{(a b

c d

)∈M2(R) : a = b = c

}and F = 〈

(1 1

2 1

),

(2 0

−1 1

)〉 as subspaces of

M2(R).

6.34 For each of the subspaces E in the previous exercise (exercise 6.33), complete the re-

spective bases to a basis of the whole vector space.

6.35 Let M2(R) be the space of all real 2× 2 matrices and let S and T be the subsets

S = {A ∈M2(R) : A = At} and T = {A ∈M2(R) : A = −At}.

1) Prove that S and T are vector subspaces.

2) Give a basis and the dimension of each subspace.

3) Prove that every matrix M ∈ M2(R) can be written as M = A + B, with A ∈ S and

B ∈ T .

6.36 Give two vector subspaces of R4 of dimension two such that their intersection reduces

to a single vector. Is this possible in R3? Justify the answer.

Page 19: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

15

6.37 Let B = {

1

5

6

,

−2

−5

3

,

1

4

−1

} and B′ = {

1

3

2

,

−1

−2

5

,

0

2

4

} be bases of R3.

1) Prove that they are indeed bases.

2) Give the change-of-basis matrix from B to B′ (PBB′) and the change-of-basis matrix from

B′ to B (PB′

B ).

3) Compute the coordinates in both bases B and B′ of the vector that in the canonical basis

has coordinates

2

5

2

.

6.38 Let B = {p1(x), p2(x), p3(x)} be a basis of P2(R), the space of all polynomials of degree

≤ 2. Let u(x) = x2 + x + 2, v(x) = 2x2 + 3 and w(x) = x2 + x. If the coordinates of u(x),

v(x) and w(x) in the basis B are u(x)B = (2, 1, 0), v(x)B = (2, 0, 2) and w(x)B = (1, 1,−2),

respectively, give the coordinates of the vectors in B in the canonical basis {x2, x, 1}.

6.39 Let

B =

{(1 0

0 0

),

(0 1

0 0

),

(0 0

1 0

),

(0 0

0 1

)},

B′ =

{(1 1

0 0

),

(0 1

1 0

),

(0 0

1 1

),

(0 0

0 1

)}be two bases of M2(R). Give the change-of-basis matrices PBB′ and PB

B .

6.40 Given B and B′ below, prove that they are basis of R3.

B = {

2

1

1

,

1

2

1

,

1

1

2

}, B′ = {

0

1

1

,

1

0

1

,

1

1

0

}.Let u be a vector of R3 whose coordinates in the basis B and B′ are uB =

xyz

and uB′ =

x′y′z′

, respectively. Express x, y and z in terms of x′, y′ and z′, and conversely.

6.41 Let E be an R−vector space of dimension 2 and let B = {e, f} be a basis of E. Define

u = 3e− f and v = e+ f .

1) Prove that B′ = {u, v} is also a basis of E.

2) Give the coordinates of u, v, e and f in the bases B and B′.

3) Let w be the vector whose coordinates in the basis B′ are

(3

4

). Give its coordinates in

the basis B.

Page 20: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

7Linear maps

Exercises

7.1 Determine which of the following maps are linear:

1) f : R2 → R, f

(x

y

)= x+ y;

2) f : R2 → R, f

(x

y

)= x2y2;

3) f : R3 → R3, f

xyz

=

x+ 7

2y

x+ y + z

;

4) f : R2 → R3, f

(x

y

)=

x

y − xx+ y

;

5) f : R3 → R3, f

xyz

=

xyzx

.

7.2 Determine which of the following maps f : P2(R)→ P2(R) are linear:

1) f(a0 + a1x+ a2x2) = 0;

2) f(a0 + a1x+ a2x2) = a0 + (a1 + a2)x+ (2a0 − 3a1)x2;

3) f(a0 + a1x+ a2x2) = a0 + a1(1 + x) + a2(1 + x)2.

7.3 Determine which of the following maps are linear:

1) f : M2(R)→ R defined by f(

(a b

c d

)) = a+ d;

2) f : M2(R)→M2×3(R) defined by f(A) = AB, with B ∈M2×3(R) a fixed matrix;

3) f : Mn(Z2)→ Z2, defined by f(A) = det(A).

7.4 In each case, determine if there exists an endomorphism f : R3 → R3 such that f(ui) =

vi, i = 1, 2, 3,:

1) u1 =

1

1

0

, u2 =

0

1

1

, u3 =

−1

1

0

and v1 =

1

2

3

, v2 =

3

2

1

, v3 =

8

4

0

;

Page 21: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

17

2) u1 =

1

1

0

, u2 =

0

1

1

, u3 =

−1

2

3

and v1 =

1

2

3

, v2 =

3

2

1

, v3 =

8

4

0

;

3) u1 =

1

1

0

, u2 =

0

1

1

, u3 =

−1

2

3

and v1 =

1

2

3

, v2 =

3

2

1

, v3 =

0

1

2

.

7.5 Let f : P2(R) → P2(R) be the linear map defined by: f(1) = 1 + x, f(x) = 3 − x2

and f(x2) = 4 + 2x − 3x2. What is the image of the polynomial a0 + a1x + a2x2? Compute

f(2− 2x+ 3x2).

7.6 Let f : E → F be a linear map.

1) Prove that the preimage of the zero vector of F is a subspace of E. It is called the kernelof f and it is denoted Kerf .

2) Is the preimage of any non-zero vector of F a subspace?

7.7 Determine whether the following linear maps are bijective or not using the information

given:

1) f : Rn → Rn, with Kerf = {0Rn};

2) f : Rn → Rn, with dim (Im f) = n− 1;

3) f : Rm → Rn, with n < m;

4) f : Rn → Rn, with Im f = Rn.

7.8 Let E and F be two vector spaces of dimensions n and m, respectively. Let f : E → F

be a linear map. Prove that

1) if f is injective, then n ≤ m;

2) if f is surjective, then n ≥ m;

3) if n 6= m, then f is not an isomorphism.

7.9 For each of the following linear maps, give the associated matrix in the canonical bases;

give the dimension and a basis of the kernel and of the image of the map; determine if the map

is injective, surjective, bijective or none of them; and find the inverse map, if it exists:

1) f : R→ R, f(x) = ax, for given a ∈ R;s

2) f : R2 → R2, f

(x

y

)=

(x+ 3y

2x+ 7y

);

3) f : R4 → R3, f

x

y

z

t

=

x− y + z + 2t

y − z + t

x− 2y + 2z

;

Page 22: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

18 Chapter 7. Linear maps

4) f : P2(R)→ P2(R), f(a0 + a1x+ a2x2) = (a0 − a1) + (a1 − a2)x+ (a2 − a0)x2;

5) f : P2(R)→ P2(R), f(a0 + a1x+ a2x2) = 3a0 + (a0 − a1)x+ (2a0 + a1 + a2)x2;

6) f : Z22 → Z3

2, f

(x

y

)=

x

y

x− y

;

7) f : Z32 → Z3

2, f

xyz

=

x+ y + z

y + z

z

;

8) f : M2(R)→ R2, f(

(a b

c d

)) =

(a+ d

b+ c

);

9) f : R3 →M2(R), f

xyz

=

(x− y y − zz − y x− z

).

7.10 Find the kernel of the linear map f : R3 → R3 given by f

xyz

=

x− yy − zz − x

, compute

f

2

0

1

and the preimages of the vectors

2

−1

−1

and

2

−1

0

.

7.11 Let B be an invertible matrix n× n. Prove that the map f :Mn(R)→Mn(R) defined

by f(A) = AB is a bijective endomorphism.

7.12 For the following linear maps f1 and f2, determine whether the composition function

f = f2 ◦ f1 is injective, surjective or bijective.

1) f1 : R3 → R3 and f2 : R3 → R2, where f1

xyz

=

z

x+ y

x+ 2z − y

and f2

xyz

=

(2x− 3z

y + 4z

);

2) f1 : P3(R) → P2(R) and f2 : P2(R) → P2(R), where f1(a0 + a1x + a2x2 + a3x

3) = a2 +

a3x+ a0x2 and f2(a0 + a1x+ a2x

2) = (a1 + a2) + (a0 + a2)x+ (a0 + a1)x2;

3) f1 : Z22 → Z3

2 and f2 : Z32 → Z3

2, where f1

(x

y

)=

x

x+ y

y

and f2

xyz

=

y + z

x+ y + z

y + x

.

7.13 Let E be an R-vector space and B = {u, v, w, t} a basis of E. Let f be an endomorphism

of E such that

f(u) = u+ 2w, f(v) = v + w, f(w) = 2u+ v + w, f(t) = 2u+ 2v + 4w.

Find the matrix of f in the basis B, and find a basis and the dimension of the image of f .

Page 23: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

19

7.14 Let f : E → F be a linear map such that f(e1 − e2) = u1, f(e2 − e3) = u1 − u2 and

f(2e3) = 2u1 + 2u3, where B = {e1, e2, e3} is a basis of E and B′ = {u1, u2, u3, u4} is a basis

of F . Give the dimension of the image of f .

7.15 For the following subspaces E and F of R4, determine if there exists a linear map

f : R4 → R4 such that f(u) = 0 for each u ∈ E and f(v) = v for each v ∈ F .

1) E = 〈

1

2

−1

0

,

1

1

0

2

〉 and F = 〈

2

2

2

3

,

1

1

0

1

〉.

2) E = 〈

1

0

−1

3

,

4

1

0

2

〉 and F = 〈

1

0

0

2

,

1

1

1

−5

〉.

7.16 Let f be an endomorphism of R3 with associated matrix(m− 2) 2 −1

2 m 2

2m 2(m+ 1) m+ 1

.

Find the dimension of the image according to the values of m.

7.17 Let E and F be two K-vector spaces, f : E → F a linear map, and v1, v2, . . . , vn vectors

of E. For each of the following statements, prove it if it is true and give a counterexample if it

is false.

1) If v1, v2, . . . , vn are linearly independent, then f(v1), f(v2), . . . , f(vn) are linearly inde-

pendent.

2) If f(v1), f(v2), . . . , f(vn) are linearly independent, then v1, v2, . . . , vn are linearly inde-

pendent.

3) If v1, v2, . . . , vn is a spanning set of E, then f(v1), f(v2), . . . , f(vn) is a spanning set of F .

4) If f(v1), f(v2), . . . , f(vn) a spanning set of F , then v1, v2, . . . , vn is a spanning set of E.

5) If v1, v2, . . . , vn is a spanning set of E, then f(v1), f(v2), . . . , f(vn) is a spanning set of

Im f .

7.18 Give the matrices of the following linear maps in the canonical basis:

1) f : R2 → R2 such that f

(1

1

)=

(2

2

)and f

(−1

2

)=

(1

−2

);

2) f : R2 → R4 such that f

(2

−1

)=

1

0

−1

3

and f

(4

1

)=

2

−2

3

1

;

Page 24: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

20 Chapter 7. Linear maps

3) f : Z32 → Z2

2 such that f

1

1

1

=

(1

1

), f

0

1

1

=

(0

1

)and f

1

0

1

=

(0

1

).

7.19 Let f be the endomorphism of P2(R) given by f(a0 + a1x+ a2x2) = 3a0 + (a0 − a1)x+

(2a0 + a1 + a2)x2. Give the matrix of f in the basis B = {1 + x2,−1 + 2x+ x2, 2 + x+ x2}.

7.20 Let BE = {e1, e2, e3} be a basis of an R-vector space E and BF = {v1, v2} a basis of an

R-vector space F . Let us consider the linear map f : E → F defined by

f(xe1 + ye2 + ze3) = (x− 2z)v1 + (y + z)v2.

Find the matrix of f in the indicated bases:

1) BE = {e1, e2, e3} and BF = {v1, v2}.

2) BE = {e1, e2, e3} and B′F = {2v1, 2v2}.

3) B′E = {e1 + e2 + e3, 2e1 + 2e3, 3e3} and BF = {v1, v2}.

4) B′E = {e1 + e2 + e3, 2e1 + 2e3, 3e3} and B′F = {2v1, 2v2}.

7.21 Let us consider the endomorphism fN : M2(R) → M2(R) defined by fN (A) = NA

where

N =

(1 1

1 1

).

1) Find the matrix of fN in the canonical basis of M2(R).

2) Compute KerfN and Im fN .

3) Find the matrix of fN in the basis

B =

{(1 1

0 0

),

(0 1

1 0

),

(0 0

1 1

),

(0 0

0 1

)}.

7.22 Let M =

0 2 1

0 0 3

0 0 0

be the matrix of an endomorphism f of R3 in canonical basis.

1) Find the subspaces Kerf and Imf .

2) Find a basis B of R3 such that the matrix of f in basis B is MB =

0 1 0

0 0 1

0 0 0

.

Page 25: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

21

7.23 Let u1 =

1

0

1

0

and u2 =

1

1

1

0

be vectors of R4 and let E be the subspace spanned by

BE = {u1, u2}. Let v1 =

1

1

1

and v2 =

2

1

0

be vectors of R3 and F the subspace spanned

by BF = {v1, v2}. Let f : E → F be given by f(x1u1 + x2u2) = (x1 − x2)v1 + (x1 + x2)v2.

1) Find the matrix of f in the bases BE and BF .

2) Is f injective? Is it surjective?

3) Let B′E = {

0

1

0

0

,

2

1

2

0

} and B′F = {

−1

0

1

,

0

1

2

}. Prove that they are bases of E and

F , respectively, and give the matrix of f in these new bases.

7.24 Using the matrix of the corresponding linear map, give the image of the vector

(−1

2

)by the reflection through

1) the x axis; 2) the y axis.

7.25 Using the matrix of the corresponding linear map, give the image of the vector

2

−5

3

by the reflection through

1) the plane xy; 2) the plane yz; 3) the plane xz.

7.26 Using the matrix of the corresponding linear map, give the orthogonal projection of the

vector

(2

−5

)onto

1) the x axis; 2) the y axis.

7.27 Using the matrix of the corresponding linear map, give the orthogonal projection of the

vector

2

−5

3

onto

1) the plane xy; 2) the plane yz; 3) the plane xz.

Page 26: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

22 Chapter 7. Linear maps

7.28 Find the image of the vector

(−1

3

)of R2 by a rotation of angle

1) θ = 30o; 2) θ = −60o; 3) θ = 45o; 4) θ = 90o.

7.29 Find the image of the vector

1

−1

2

by a counterclockwise rotation,

1) of 30o around the x axis;

2) of 45o around the y axis;

3) of 90o around the z axis;

4) of 60o around the z axis.

7.30 Give the matrix of the following compositions of linear maps of R2:

1) a counterclockwise rotation of 30o, followed by a reflection through the y axis;

2) an orthogonal projection onto the y axis, followed by a contraction of factor k = 1/2;

3) a dilation of factor k = 2, followed by a counterclockwise rotation of 45o, followed by a

reflection through the y axis.

7.31 Give the matrix of the following compositions of linear maps of R3:

1) a reflection through the yz plane, followed by an orthogonal projection on the xz plane;

2) a counterclockwise rotation of 45o around the y axis, followed by a dilation of factor

k =√

2;

3) a counterclockwise rotation of 30o around the x axis, followed by a counterclockwise

rotation of 30o around the z axis, followed by a contraction of factor k = 1/3.

7.32 Let f1 : R2 → R2 and f2 : R2 → R2 be linear maps. Determine if f1 ◦ f2 = f2 ◦ f1 when:

1) f1 and f2 are the orthogonal projections onto the y and x axes, respectively;

2) f1 is the counterclockwise rotation of angle θ1 and f2 is the counterclockwise rotation of

angle θ2;

3) f1 is the reflection through the x axis and f2 is the reflection through y axis;

4) f1 is the orthogonal projection on the y axis and f2 is the counterclockwise rotation of

angle θ.

7.33 Let f1 : R3 → R3 and f2 : R3 → R3 be linear maps. Determine if f1 ◦ f2 = f2 ◦ f1 when:

1) f1 is a dilation of factor k and f2 is a counterclockwise rotation around the z axis of angle

θ;

2) f1 is a counterclockwise rotation around the x axis of angle θ1 and f2 is counterclockwise

rotation around the z axis of angle θ2.

Page 27: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

8Diagonalization

Exercises

(In this chapter, all vector spaces are of finite dimension.)

8.1 Let f be an endomorphism of a K-vector space E and let u ∈ E be an eigenvector of f of

eigenvalue λ ∈ K. Prove that:

1) −u is an eigenvector of f of eigenvalue λ;

2) u is an eigenvector of f2 of eigenvalue λ2.

8.2 Prove that a square matrix A and its transpose At have the same eigenvalues.

8.3 Let J be the matrix of M5(R) with all entries equal to 1. Find a basis of R5 consisting

of an eigenvector of J of eigenvalue 5 and 4 eigenvectors of eigenvalue 0.

8.4 Let E be an R-vector space and f and g two endomorphisms of E with the same eigen-

values. Prove:

1) f is bijective if and only if 0 is not an eigenvalue of f ;

2) f is bijective if and only if g is bijective.

8.5 Let A ∈ Mn(R). Suppose tht there exist m ∈ N, m > 1, and x ∈ Rn such that

Am−1x 6= 0Rn and Amx = 0Rn . Show that Am−1x is an eigenvector of A.

8.6 Compute the characteristic polynomial, the eigenvalues and the eigenspaces of the follow-

ing matrices. In each case, determine if they are diagonalizable and give, when it exists, a basis

in which the associated matrix is diagonal.

1)

(1 2

3 2

), 2)

(1 0

2 −1

),

3)

3 1 1

2 4 2

1 1 3

,

Page 28: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

24 Chapter 8. Diagonalization

4)

1 1 1

0 1 1

0 0 1

,

5)

1 −3 3

3 −5 3

6 −6 4

,

6)

0 1 0

−4 4 0

−2 1 2

,

7)

1 −1 −1

1 −1 0

1 0 −1

,

8)

0 1 0 0

0 0 1 0

0 0 0 1

−4 12 −13 6

,

9)

−2 0 0 4

2 1 0 2

3 0 −1 3

4 0 0 −2

.

8.7 Find the eigenvalues and eigenvectors of the following endomorphisms. If they are diag-

onalizable, give a basis in which they diagonalize and the associated diagonal matrix.

1) f : R3 → R3, f

xyz

=

2x+ 4z

3x− 4y + 12z

x− 2y + 5z

.

2) f : P2(R) −→ P2(R),

f(a+ bx+ cx2) = (5a+ 6b+ 2c)− (b+ 8c)x+ (a− 2c)x2.

3) f : P3(R) −→ P3(R),

f(a+ bx+ cx2 + dx3) = (a+ b+ c+ d) + 2(b+ c+ d)x+ 3(c+ d)x2 + 4dx3.

8.8 Find the eigenvalues and eigenvectors of the endomorphism f : M2(R) −→M2(R) defined

by

f

(a b

c d

)=

(2c a+ c

b− 2c d

).

8.9 Prove that if A ∈Mn(R) is an upper triangular matrix, with the elements in the diagonal

pairwise different, then A is diagonalizable.

8.10 Discuss whether the following matrices diagonalize over R according to the values of the

parameters:

1)

(a b

−b 0

)

2)

1 0 0

a 1 0

b c 2

,

3)

a b 0

0 −1 0

0 0 1

,

4)

c 2a 0

b 0 a

0 2b −c

,

5)

1 a 0 1

0 1 0 0

0 0 2 0

0 0 0 b

,

6)

2a− 1 1− a 1− aa− 1 1 1− aa− 1 1− a 1

,

7)

1 0 0

b a 0

0 0 2

.

Page 29: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

25

8.11 Let f : R3 → R3 be a linear map. Let F and G be the vector subspaces of R3 defined as

follows:

F = {

xyz

∈ R3 | 2x+ z = 0} and G = 〈

1

−1

0

,

1

0

1

〉.Consider the following three conditions on f , F and G:

(I) f

1

1

1

=

1

1

1

and f

1

0

0

− f0

1

0

= f

1

1

2

;

(II) f2 = f ;

(III) f(F ∩G) ⊂ F ∩G and f(F ∩G) 6= {

0

0

0

}.Prove that:

1) if (I) holds, then 0 and 1 are eigenvalues of f ;

2) if (II) holds, then the only possible eigenvalues of f are 0 and 1;

3) F ∩G = 〈

−1

3

2

〉;

4) if (III) holds, then

−1

3

2

is an eigenvector of nonzero eigenvalue;

5) if all three conditions (I), (II) and (III) hold, then f is diagonalizable; find a basis in

which f diagonalizes.

8.12 Determine if there exists an endomorphism f : R3 → R3 satisfying the conditions spec-

ified below. If it exists, give it explicitly, compute its characteristic polynomial and determine

if it is diagonalizable or not.

1)

1

2

1

and

2

0

1

are eigenvectors of eigenvalue 1 and

1

−1

0

is an eigenvector of eigen-

value 0.

2) f−1(0) = {

xyz

∈ R3| 5x+ y − 2z = 0} and

1

1

1

is an eigenvector of eigenvalue −1/2.

3) f

1

0

0

=

2

0

0

, f

1

1

0

=

1

1

0

and f

0

0

1

=

0

1

1

.

Page 30: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

26 Chapter 8. Diagonalization

4) f−1(0) = 〈

0

0

1

〉 and F = {

xyz

∈ R3|x+ y = z} is the eigenspace of the eigenvalue 2.

8.13 Consider the endomorphism f of R3 defined by f

xyz

=

ax− yx+ y + z

2z

, where a is a

real parameter.

1) Give the dimension of Im f according to the values of a ∈ R.

2) Let F and G be the subspaces of R3 defined by

F = {

xyz

∈ R3|x− ay + z = 0} and G = {

xyz

∈ R3| bx+ y + bz = 0},

where b is another real parameter. Find the values of a and b such that G is equal to the

image of F by f .

3) Is f diagonalizable when a = 3?

4) Give conditions on a such that all eigenvalues of f are real.

8.14 Let A ∈Mn(R).

1) How are the eigenvalues of A and Ak related? And the eigenvectors?

2) Prove that if the matrix A can be written as A = PDP−1, where P is an invertible

matrix, then Ak = PDkP−1.

3) Using the previous result, compute

i)

(17 −6

35 −12

)100

, ii)

3 0 1

0 1 0

1 0 3

2001

, iii)

2 0 0 9

5 13 0 5

7 0 −1 7

9 0 0 2

70

.

8.15 An UFO leaves a planet in which the vectors v1, v2, v3 have their origin. These vectors

are used as a basis of a coordinate system of the universe (R3). After arriving at the point0

0

1

the spaceship is pushed by a strange force such that every day it is moved from the point

v to the point Av, where

A =

0 0 −2

1 2 1

1 0 3

.

1) What will be the position of the spaceship after 10 days?

2) Will the spaceship arrive some day to Earth, which is located in the point(−2

35

)?

Page 31: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

Review exercises

Matrices, systems of linear equations and determinants

B.1 Given two diagonal matrices A and B of the same type, prove that AB = BA.

B.2 Let A and B be two upper (lower) triangular matrices of the same type. Prove that AB

is an upper (lower) triangular matrix.

B.3 Prove that if A is an m× n matrix, then AAt and AtA are symmetric matrices.

B.4 Let A be a symmetric n× n matrix such that A2 = A, and let us assume that for any i

we have aii = 0. Prove that all entries in the ith row and in the ith column of A are zero.

B.5 Find the set of matrices A ∈M2(R) such that A2 = I.

B.6 Let A, B and C be matrices. Prove that

1) if A is row equivalent to B, then B is row equivalent to A;

2) if A is row equivalent to B and B is row equivalent to C, then A is row-equivalent to C.

B.7 Prove that the following system of linear equations is consistent but underdetermined

with two degrees of freedom. 4x− y + z + 2t+ 2u = 1

y + z − 2u = 1

2x+ z + t = 1

x− y + t+ 2u = 0

5x+ y + 3z + 2t− 2u = 3

Answer the following questions.

1) What is the maximum number of independent equations?

2) Is the second equation a linear combination of the others? Answer the same question for

the fourth equation.

Page 32: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

28 Review exercises

3) Is there any solution of the system such that x = 2π? Answer the same question for

y = 2√

3.

4) Is there any solution of the system such that x = 0 and y = 2√

3? The same for z = 2π

and t = 2√

3.

B.8 For any matrix A let B be the matrix obtained by multiplying one row of A by a constant

c. Prove that detB = c detA.

B.9 Solve the following systems of linear equations. Use Gausssian elimination and give the

solution in parametric form.

1)

x+ y = 2

x+ 3y = 0

2x+ 4y = 2

2x+ 3y = −3

2)

−x+ y + 2z = 1

2x+ 3y + z = −2

5x+ 4y + 2z = 4

3)

x− y + 2z = 7

2x− 2y + 2z − 4w = 12

−x+ y − z + 2w = −4

−3x+ y − 8z − 10w = −29

4)

x+ 6y − z − 4w = 0

−2x− 12y + 5z + 17w = 0

3x+ 18y − z − 6w = 0

5x+ 30y − 6z − 23w = 0

B.10 Discuss the following systems according to the values of the parameters (assumed to be

real).

1)

x+ y +mz = m

x+my + z = m

mx+ y + z = m

2)

{(a− 1)x− ay = 2

6ax− (a− 2)y = 5− a

3)

ax+ 3y = 2

3x+ 2y = a

2x+ ay = 3

4)

ax+ 2y + 3z + u = 6

x+ 3y − z + 2u = b

3x− ay + z = 2

5x+ 4y + 3z + 3u = 9

Vector spaces

B.11 Let F(R) be the vector space defined in the exercise 6.6. Determine which of the

following subsets are vector subspaces of F(R). (Justify your answers.)

F1 = {f ∈ F(R) : f(1) = f(2)}F2 = {f ∈ F(R) : f(1) = f(2) + 1}F3 = {f ∈ F(R) : f(1) = 0}F4 = {f ∈ F(R) : f(−x) = f(x) ∀x ∈ R}F5 = {f ∈ F(R) : f is continuous}

Page 33: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

Review exercises 29

B.12 Prove that the set of solutions of a system of linear equations with n unknowns is a

vector subspace of Rn if and only if the system is homogeneous.

B.13 Let us consider the subspaces of R3

F = 〈

0

1

1

,

1

0

2

,

−2

3

−1

〉 and G = 〈

1

1

3

,

−1

4

a

〉.Determine the values of a such that F = G.

B.14 Let E be an R-vector space and u, v, w three vectors such that 2u+2v−w = −4u−5v+w.

Prove that {u, v, w} is a linearly dependent set.

B.15 Let E be a vector space and v1, v2, v3 vectors of E. Prove that the following statements

are equivalent.

a) {v1, v2, v3} is linearly independent.

b) {v1 + v2, v2, v2 + v3} is linearly independent.

c) {v1 + v2, v1 + v3, v2 + v3} is linearly independent.

B.16 Prove that the set {

1

0

0

0

,

1

1

0

0

,

1

1

1

0

,

1

1

1

1

} is a basis of R4. Write down the vector

−3

7

6

−5

as a linear combination of the vectors in this basis.

B.17 Let F be the subspace of R4 given by

F = 〈

0

1

−1

1

,

1

1

0

9

,

5

2

3

42

,

1

−3

4

5

,

4

5

−1

37

〉.

1) Find a basis of F .

2) Prove that e =

9

7

2

79

∈ F and compute the coordinates of e in the basis of the previous

question.

3) Find a basis of F that contains e.

Page 34: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

30 Review exercises

B.18 Let {u, v} be a basis of R2. Prove that the set {αu+βv : α+β = 0} is a vector subspace.

Describe this subspace geometrically and find a basis of it.

B.19 Let E be a vector subspace. Prove:

1) If {e1, . . . , en} is a spanning set of E such that when one removes any of the ei it no longer

spans E, then {e1, . . . , en} is a basis of E.

2) If {e1, . . . , en} is a linearly independent set of E such that it becomes linearly dependent

after adding any new vector, then {e1, . . . , en} is a basis of E.

B.20 Find a basis and the dimension of the following subspaces.

1) E1 = {

x

y

z

t

∈ R4 : x = y = 2z}.

2) E2 = {

x

y

z

t

∈ R4 : x = y − 3z, z = t}.

3) E3 = 〈

1

1

0

,

1

0

−1

,

2

1

1

,

1

−1

1

〉 ⊆ (Z5)3.

4) E4 = 〈

1

1

0

,

2

3

1

,

2

1

4

〉 ⊆ (Z5)3.

5) E1 ∩ E2.

6) E3 ∩ E4.

B.21 Let E1, E2, E3 and E4 be the subspaces in the previous exercise. For each of them,

complete the basis found to a basis of the whole space.

B.22 Let F = {

a

2a

2b− a

: a, b ∈ Q}. Prove that it is a vector subspace of Q3. Find a basis

and its dimension.

Answer the same questions if we take Z2 instead of Q as the field of scalars.

B.23 A matrix M ∈ Mn(R) is called magic if the sum of the elements in each row, column

and in the main diagonal is the same in all cases. Prove that the set of magic matrices is a

subspace of Mn(R). For n = 2, 3 find a basis of this subspace and its dimension.

Page 35: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

Review exercises 31

B.24 Let B = {

−3

0

3

,

−3

2

−1

,

1

6

−1

} and B′ = {

−6

−6

0

,

−2

−6

4

,

−2

−3

7

} be bases of R3.

1) Prove that they are indeed bases.

2) Give the change-of-basis matrix from the basis B to the basis B′ (PBB′) and the change-

of-basis matrix from B′ to B (PB′

B ).

3) Compute the coordinates in the bases B and B′ of the vector v whose coordinates in the

canonical basis are

−5

8

−5

.

B.25 Let E be a vector space over R of dimension 3 and let {e1, e2, e3} be a basis of E. The

vector v has coordinates

1

0

−1

in this basis. Compute the coordinates of v in the basis:

u1 = e1 + e2 + e3u2 = e1 − e2u3 = e2 − e3

(You do not need to prove that it is a basis.)

B.26 Let

B =

{(1 0

0 0

),

(0 1

0 0

),

(0 0

1 0

),

(0 0

0 1

)},

B′ =

{(1 3

2 −1

),

(−2 −5

−5 4

),

(−1 −2

−2 4

),

(−2 −3

−5 11

)}be two bases of M2(R). Give the change-of-basis matrices PBB′ and PB

B .

Linear maps

B.27 Let B = {v1, v2, v3} be a basis of R3, with v1 =

1

2

3

, v2 =

2

5

3

and v3 =

1

0

10

. Is

there a linear map f : R3 → R2 such that f(v1) =

(1

0

), f(v2) =

(1

0

), and f(v3) =

(0

1

)? If so,

give the image of the vector

xyz

by this map f .

B.28 Determine which of the following vector spaces are isomorphic to R6: M2×3(R), R6[x],

M6×1(R), W = {(x1, x2, x3, 0, x5, x6, x7) : xi ∈ R}.

Page 36: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

32 Review exercises

B.29 Let f :M3(R)→M3(R) be defined by f(A) = A− At. Compute the preimage of the

zero vector and its dimension.

B.30 Let B = {u, v, w} be a basis of a K-vector space E, and let f be an endomorphism of

E such that:

f(u) = u+ v, f(w) = u, Kerf = 〈u+ v〉.

Give a basis and the dimension of the subspaces Imf and Imf2

B.31 Let f be an endomorphism of R3 such that f

1

0

1

=

1

0

−1

and f−1(0) = {

xyz

∈R3 : x− 3y + 2z = 0}.

1) Give the matrix of f in the canonical basis.

2) Compute the dimension of f−1(0) and of the image of f .

3) Give an explicit expression for the image of an arbitrary vector.

4) Determine if it is injective, surjective, bijective or none of them.

B.32 Let fr be the endomorphisms of R3 defined by

fr

xyz

=

2x+ y + 2z

x+ y

x+ 2y + rz

, r ∈ R.

1) Find the value of r such that the dimension of Im fr is the lowest possible one.

2) For the values of r obtained in the previous item, give a basis and the dimension of the

preimage of the zero vector by fr.

3) Given v =

3

2

t

, does it exist any t such that f−1r (0) = 〈v〉?

4) If w =

1

2

1

, compute fr(w) and f−1r (fr(w)).

B.33 Let E and F be two K-vector spaces and f : E → F a linear map. Let v1, v2 be two

vectors of E. Prove the following assertions:

1) If v1 and v2 are linearly dependent, then f(v1) and f(v2) are linearly dependent.

2) If f(v1) and f(v2) are linearly independent, then v1 and v2 are linearly independent.

3) Assuming f is injective, if f(v1) and f(v2) are linearly dependent, then v1 and v2 are

linearly dependent.

Page 37: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

Review exercises 33

B.34 Let E be a R-vector space and v1, v2, . . . , vn vectors of E. Let us also consider the

map f : Rn → E given by f(x1, x2, . . . , xn)t = x1v1 + x2v2 + · · · + xnvn. Prove the following

assertions.

1) f is injective if and only if the vectors v1, v2, . . . , vn are linearly independent.

2) f is surjective, if and only if, the vectors v1, v2, . . . , vn span E.

3) f is bijective, if and only if, the vectors v1, v2, . . . , vn are a basis of E.

B.35 LetA =

(1 1 1

1 0 0

)be the matrix of f : Z3

2 → Z22 in the basesB1 = {

1

1

1

,

1

1

0

,

1

0

0

}of Z3

2 and B2 = {(

1

1

),

(1

0

)} of Z2

2.

1) Give the matrix of f in the canonical bases of Z32 and Z2

2.

2) Find the matrix of f in the basis B′1 = {

1

0

1

,

0

1

0

,

1

1

0

} of Z32 and B′2 = {

(0

1

),

(1

0

)}

of Z22.

3) Let v ∈ Z32 be the coordinates

1

0

1

in the basis B1. Give the coordinates of f(v) in the

basis B′2.

B.36 Let f be an endomorphism of R3 whose matrix in the basis u1 =

1

1

2

, u2 =

−1

2

1

, u3 =

1

−1

1

is given by

A =

5 1 3

−5 −1 −3

−8 −1 −5

.

1) Find the matrix of f in the canonical basis.

2) Determine if f is injective, surjective or bijective.

3) Find the preimage of the vector w = au1 + bu2 − bu3 according to the values of a and b.

Give the result in the canonical basis.

B.37 Let B = {e1, e2, e3, e4} be a basis of a Z2-vector space E, and let f : E → E be the

linear map defined by

f(x1e1 + x2e2 + x3e3 + x4e4) = (x1 + x2)e1 + (x3 + x4)e2.

Page 38: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

34 Review exercises

1) Find the matrix of f in the basis B.

2) Prove that f 6= f2 and f2 = f3 6= 0.

3) Find a basis and the dimension of the subspaces Imf, Imf2.

4) Prove that the vectors e4, e1 + e2, e2 + e4, e1 + e2 + e3 form a basis of E and write the

matrix of f in this basis.

B.38 Give the matrix of the following compositions of the linear maps of R2:

1) a reflection through the x axis, followed by a dilation of factor k = 3;

2) a counterclockwise rotation of 60o, followed by an orthogonal projection onto the x axis,

followed by a central symmetry.

B.39 Give the matrix of the following compositions of linear maps of R3:

1) an orthogonal projection onto the xy plane, followed by a reflection through the yz plane,

followed by a contraction of factor k = 3;

2) a reflection through the xy plane, followed by a reflection through the xz plane, followed

by a counterclockwise rotation of 60o around the z axis.

Diagonalization

B.40 Let f : E → E be a bijective endomorphism. Prove that f diagonalizes in the basis B if

and only if f−1 diagonalizes in the basis B. What is the relationship between the eigenvalues

of f and those of f−1?

B.41 Let A ∈ Mn(R) be a matrix such that A2 = A, and let B ∈ Mn(R) be any matrix.

Prove that any eigenvalue of AB is also an eigenvalue of ABA.

B.42 For each of the following endomorphisms, find the characteristic polynomial, the eigen-

values and the eigenspaces. Determine if they are diagonalizable.

1) f : R2 → R2, f

(x

y

)=

(x

2x+ 3y

).

2) f : R3 → R3, f

xyz

=

0

3y

−z

.

3) f : R3 → R3, f

xyz

=

−z3y

0

.

4) f : R3 → R3, f

xyz

=

2x

−8x− 2y + 36z

−2x+ 4z

.

Page 39: Mathematics 1 Part II: Linear Algebra - UPC Universitat ... Degree in Informatics Engineering Barcelona School of Informatics Mathematics 1 Part II: Linear Algebra Exercises and problems

Review exercises 35

5) f : R3 → R3, f

xyz

=

x+ z

3x+ 2y + 3z

x+ z

.

6) f : R4 → R4, f

x

y

z

t

=

x

2x+ 5y + 6z + 7t

3x+ 8z + 9t

4x+ 10t

.

7) f : Rn → Rn, f

x1x2. . .

xn

=

x1 + x2 + · · ·+ xnx2 + · · ·+ xn

. . .

xn

.

B.43 Let us consider the endomorphism f of R4 whose matrix in canonical basis is

A =

0 0 0 0

−2 −1 0 −2

1 0 1 0

2 1 0 2

.

1) Compute the characteristic polynomial and the eigenvalues.

2) Find a basis of R4 given by eigenvectors of f .

3) Give the change-of-basis matrix P from the basis obtained in 2) to the canonical basis.

Compute P−1.

4) Write down the diagonal matrix of f in the basis obtained in 2) and prove that it is equal

to P−1AP .

B.44 Let C ∈Mn(R) be a non-null matrix and let fC : Mn(R)→Mn(R) be the map defined

by fC(A) = CA−AC, for each matrix A ∈Mn(R).

1) Prove that fC is not injective.

2) If C =

(a 0

c d

), for which values of the real parameters a, c and d the endomorphism fC

diagonalizes?