Sheet 07.5: Matrices II: Inverse, Basis Transformation · PDF file · 2016-08-16......

7
Fakult¨ at f¨ ur Physik R: Rechenmethoden f¨ ur Physiker, WiSe 2015/16 Dozent: Jan von Delft ¨ Ubungen: Benedikt Bruognolo, Dennis Schimmel, Frauke Schwarz, Lukas Weidinger http://homepages.physik.uni-muenchen.de/ ~ vondelft/Lehre/15r/ Sheet 07.5: Matrices II: Inverse, Basis Transformation Posted: Friday, 27.11.15 Due: Friday, 04.12.15, 13:00 Central Tutorial: 09.12.15 [2](E/M/A) means: problem counts 2 points and is easy/medium hard/advanced Example Problem 1: Calculating determinants [2] Points: [2](E) Compute the determinants of the following matrices by expanding them along an arbitrary row or column. Hint: The more zeros it contains, the easier the calculation. A = 2 1 5 -3 , B = 3 2 1 4 -3 1 2 -1 1 ! , C = a a a 0 a 0 0 b 0 0 b b a b b 0 . Example Problem 2: Gaussian elimination and matrix inversion [4] Points: (a)[1](M); (b)[1](M); (c)[1](M); (d)[1](M) (a) Solve the following system of linear equations using Gaussian elimination. 3x 1 + 2x 2 - x 3 = 1, 2x 1 - 2x 2 + 4x 3 = -2, -x 1 + 1 2 x 2 - x 3 = 0. [Check your result: the norm of x is kxk =3.] (b) How does the solution change when the last equation is removed? (c) What happens if the last equation is replaced by -x 1 + 2 7 x 2 - x 3 =0? (d) This system of equations can also be expressed in the form Ax = b. Calculate the inverse A -1 of the 3 × 3 Matrix A using Gaussian elimination, and verify your answer to (a) using x = A -1 b. Example Problem 3: Two-dimensional rotation matrices [4] Points: (a)[1](M); (b)[1](E); (c)[1](M); (d)[1](M) A rotation in two dimensions is a linear map, R : 2 2 , that rotates every vector by a given angle about the origin without changing its length. (a) Find the 2×2 dimensional rotation matrix R θ describing a rotation by the angle θ by proceeding as follows: Make a scetch that illustrates the effect e j R θ (e i ) -→ e 0 j of the rotation about the i axis on the three basis vectors e j (j =1, 2, 3) (eg. for θ = π 6 ). The image vectors e 0 j of the basis vectors e j yield the columns of R θ . 1

Transcript of Sheet 07.5: Matrices II: Inverse, Basis Transformation · PDF file · 2016-08-16......

Page 1: Sheet 07.5: Matrices II: Inverse, Basis Transformation · PDF file · 2016-08-16... Gaussian elimination and matrix inversion [4] ... Find the matrix T =1, and use the inverse transformation

Fakultat fur Physik

R: Rechenmethoden fur Physiker, WiSe 2015/16

Dozent: Jan von Delft

Ubungen: Benedikt Bruognolo, Dennis Schimmel,

Frauke Schwarz, Lukas Weidinger

http://homepages.physik.uni-muenchen.de/~vondelft/Lehre/15r/

Sheet 07.5: Matrices II: Inverse, Basis Transformation

Posted: Friday, 27.11.15 Due: Friday, 04.12.15, 13:00 Central Tutorial: 09.12.15[2](E/M/A) means: problem counts 2 points and is easy/medium hard/advanced

Example Problem 1: Calculating determinants [2]Points: [2](E)

Compute the determinants of the following matrices by expanding them along an arbitrary row orcolumn. Hint: The more zeros it contains, the easier the calculation.

A =(2 15 −3

), B =

(3 2 14 −3 12 −1 1

), C =

a a a 0a 0 0 b0 0 b ba b b 0

.

Example Problem 2: Gaussian elimination and matrix inversion [4]Points: (a)[1](M); (b)[1](M); (c)[1](M); (d)[1](M)

(a) Solve the following system of linear equations using Gaussian elimination.

3x1 + 2x2 − x3 = 1,2x1 − 2x2 + 4x3 = −2,−x1 + 1

2x2 − x3 = 0.

[Check your result: the norm of x is ‖x‖ = 3.]

(b) How does the solution change when the last equation is removed?

(c) What happens if the last equation is replaced by −x1 + 27x2 − x3 = 0?

(d) This system of equations can also be expressed in the form Ax = b. Calculate the inverseA−1 of the 3 × 3 Matrix A using Gaussian elimination, and verify your answer to (a) usingx = A−1b.

Example Problem 3: Two-dimensional rotation matrices [4]Points: (a)[1](M); (b)[1](E); (c)[1](M); (d)[1](M)

A rotation in two dimensions is a linear map, R : R2 → R2, that rotates every vector by a given

angle about the origin without changing its length.

(a) Find the 2×2 dimensional rotation matrix Rθ describing a rotation by the angle θ by proceeding

as follows: Make a scetch that illustrates the effect ejRθ(ei)−→ e′j of the rotation about the i axis

on the three basis vectors ej (j = 1, 2, 3) (eg. for θ = π6

). The image vectors e′j of the basisvectors ej yield the columns of Rθ.

1

Page 2: Sheet 07.5: Matrices II: Inverse, Basis Transformation · PDF file · 2016-08-16... Gaussian elimination and matrix inversion [4] ... Find the matrix T =1, and use the inverse transformation

(b) Write down the matrix Rθi for the angles θ1 = 0, θ2 = π/4, θ3 = π/2 and θ4 = π. Computethe action of Rθi (i = 1, 2, 3, 4) on a = (1, 0)T and b = (0, 1)T , and make a scetch tovisualize the results.

(c) The composition of two rotations again is a rotation. Show that RθRφ = Rθ+φ.

Hint: Utilize the following ‘addition theorems’:

cos(θ + φ) = cos θ cosφ− sin θ sinφ ,

sin(θ + φ) = sin θ cosφ+ cos θ sinφ .

Remark: A geometric proof of these theorems (not re-quested here) follows from the figure by inspecting thethree right-angled triangles with diagonals of length 1,cosφ and sinφ.

φsinθcos

φsin

θsin

)φ+θsin(

cos(

φcos

θcos

φcos

φsin

φ

1

θ

θ

φ−θ−2π

φcosθsin

(d) Show that the rotation of an arbitrary vector r = (x, y)T by the angle θ does not change itslength, i.e. that Dθr has the same length as r.

Example Problem 4: Basistransformation und lineare Abbildung in E2 [4]Points: (a)[0.5](M); (b)[0.5](M); (c)[0.5](E); (d)[0.5](E); (e)[0.5](M); (f)[0.5](M); (g)[0.5](E); (h)[0.5](E)

Remark on notation: For this problem we denote vectors in euclidean space E2 using hats (e.g. vj,x, y, e1 ∈ E2). Their components with respect to a given basis are vectors in R2 and are writtenwithout hats (e.g. x, y ∈ R2).

Consider two bases for the Euclidean vector space E2, one old {vj}, and one new {v′i}, with

v1 =34v′1 +

13v′2 , v2 = −1

8v′1 +

12v′2 .

(a) The relation vj = v′itij expresses the old basis in terms of the new basis. Find the transfor-

mation matrix T = (tij).

(b) Find the matrix T−1, and use the inverse transformation v′j = vi(t−1)ij to express the new

basis in terms of the old basis.

(c) Let x be a vector with components x = (1, 2)T in the old basis. Find its components x′ inthe new basis. [Kontrollergebnis: x′ = (1

2, 43)T .]

(d) Let y by a vector with components y′ = (34, 13)T in the new basis. Find its components y in

the old basis.

(e) Let A be the linear map defined by v′1A7→ 2v′1 and v′2

A7→ v′2 . First find the matrix representationA′ of this map in the new basis, then use a basis transformation to find its matrix representationA in the old basis. [Check your result: (A)21 = −3

5.]

(f) Let z be the image vector onto which the vector x is mapped by A, i.e. xA7→ z. Find its

components z′ with respect to the new basis by using A′, and its components z with respectto the old basis by using A. Are your results for z′ and z consistent?

(g) Now make the choice v1 = 3e1+e2 and v2 = −12e1+

32e2, for the old basis, where e1 = (1, 0)T

and e2 = (0, 1)T are the standard basis vectors on E2. What are the components of v′1, v′2,x and z in the standard basis E2?

2

Page 3: Sheet 07.5: Matrices II: Inverse, Basis Transformation · PDF file · 2016-08-16... Gaussian elimination and matrix inversion [4] ... Find the matrix T =1, and use the inverse transformation

(h) Make a sketch (with e1 and e2 as unit vectors in the horizontal and vertical directions re-spectively), showing the old and new basis vectors, as well as the vectors x and z. Are thecoordinates of these vectors, discussed in (c) and (f), consistent with your sketch?

Example Problem 5: Basis transformations [6]Points: (a)[1](M); (b)[1](E); (c)[1](E); (d)[1](M); (e)[1](M); (f)[1](M)

Consider the following three transformations in R3, using the standard basis {e1, e2, e3}:A : Rotation about the third axis by the angle θ3 =

π4

, in the right-hand positive direction.

B : Dilation (stretching) of the first axis by the factor s1 = 3;

C : Rotation about the second axis by the angle θ2 =π2

, in the right-hand positive direction.

Note: To understand what ‘right-hand positive‘ means, imagine wrapping your right hand aroundthe axis of rotation, with your thumb pointing in the positive direction. Your other fingers will becurled in the direction of ‘positive rotation’.

(a) Find the matrix representations (with respect to the standard basis) of A, B and C.

(b) What is the image y = Bx of the vector x = (1, 1, 1)T under the dilation B?

(c) What is the image z = Dx of x under the composition of all three maps, D = C ·B · A?

(d) Now consider a new basis {v′j}, defined by a rotation of the standard basis by A, i.e. ejA7→ v′j.

Draw the new and old basis vectors in the same figure. Find the transformation matrix T , andspecify the matrix elements of the transformation between the old and the rotated bases usingej = v′it

ij.

(e) In the {v′i} basis let the vectors x and y be represented by x = v′ix′i and y = v′iy

′i. Find thecorresponding components x′ = (x′1, x′2, x′3)T and y′ = (y′1, y′2, y′3)T .

(f) Let B′ denote the dilation B in the rotated basis. Find B′ by the appropriate transformationof the matrix B, and use the result to calculate the image y′ of x′ under B′. (Does the resultmatch that from (e) ?)

Example Problem 6: Triple Gaussian integral via transformation of variables [2]Points: [2](M)

Calculate the following three-dimensional Gaussian integral (with a, b, c > 0, a, b, c ∈ R):

I =

ˆR3

dx dy dz e−[a2(x+y)2+b2(z−y)2+c2(x−z)2]

Hint: Use the substitution u = a(x+ y), v = b(z − y), w = c(x− z) and calculate the Jacobian

determinant, using J =∣∣∣∂(u,v,w)∂(x,y,z)

∣∣∣−1. You may use´∞−∞ dx e−x

2=√π. [Check your result: if

a = b = c =√π, then I = 1

2.]

Example Problem 7: Matrix inversion [Bonus]Points: (a)[1](E); (b)[2](M)

Let Mn be an n× n matrix with matrix elements (Mn)ij = δijm+ δ1j, with i, j = 1, . . . , n.

3

Page 4: Sheet 07.5: Matrices II: Inverse, Basis Transformation · PDF file · 2016-08-16... Gaussian elimination and matrix inversion [4] ... Find the matrix T =1, and use the inverse transformation

(a) Find the inverse matrices M−12 and M−1

3 . Verify in both cases that M−1n Mn = 1.

(b) Use the results from (a) to formulate a guess at the form of the inverse matrix M−1n for

arbitrary n. Check your guess by calculating M−1n Mn.

(c) Give a compact formula for the matrix elements (M−1n )ij. Check its validity by showing that∑

l(M−1n )il(Mn)

lj = δij holds, by explicitly performing the sum on l.

[Total Points for Example Problems: 22]

Homework Problem 1: Calculating determinants [4]Points: (a)[1](E); (b)[1,5](E); (c)[1,5](E)

(a) Compute the derminant of the matrix D =

(1 c 0d 2 32 2 e

).

(i) Which values must c and d have to ensure that detD = 0 for all values of e?

(ii) Which values must d and e have to ensure that detD = 0 for all values of c?

Could you have found the results of (i,ii) without explicitly calculating detD?

Now consider the two matrices A =(2 −1 −3 10 1 5 5

)und B =

2 16 6−2 8−2 −2

.

(b) Compute the product AB, as well as its determinant det(AB) and inverse (AB)−1.

(c) Compute the product BA, as well as its determinant det(BA) and inverse (BA)−1.

Is it possible to calculate the determinant and the inverse of A and B?

Homework Problem 2: Gaussian elimination and matrix inversion [3]Points: (a)[1](E); (b)[1](E); (c)[1](M)

Consider the linear system of equations Ax = b, with

A =

8− 3a 2− 6a 2

2− 6a 5 −4 + 6a

2 −4 + 6a 5 + 3a

. (1)

(a) For a = 13, use Gaussian elimination to compute the inverse matrix A−1. (Remark: It is

advisable to avoid the occurrence of fractions until the left side has been brought into ‘row-step’ form.) Use the result to find the solution x for b = (4, 1, 1)T . [Check your result: thenorm of x is ‖x‖ =

√117/18.]

(b) For which values of a can the matrix A not be inverted?

(c) If A can be inverted, the system of equations Ax = b has a unique solution for every b, namelyx = A−1b. If A can not be inverted, then either the solution is not unique, or no solutionexists at all – it depends on b which of these two cases arises. Decide this for b = (4, 1, 1)T

and the values for a found in (b), and determine x, if possible.

4

Page 5: Sheet 07.5: Matrices II: Inverse, Basis Transformation · PDF file · 2016-08-16... Gaussian elimination and matrix inversion [4] ... Find the matrix T =1, and use the inverse transformation

Homework Problem 3: Three-dimensional rotation matrices [4]Points: (a)[1](E); (b)[1](E); (c)[1](E); (d)[0,5]; (e)[0,5](E); (f)[2](Bonus,A)

Rotations in three dimensions are represented by 3 × 3 dimensional matrices. Let Rθ(n) be therotation matrix that describes a rotation by the angle θ about an axis whose direction is given bythe unit vector n.

(a) Find the three rotation matrices Rθ(ei) for rotations about the three coordinate axes e1, e2and e3 explicitly, by proceeding as follows: Make a separate scetch for each of j = 1, 2 and 3

that illustrates the effect ejRθ(ei)−→ e′j of a rotation about the i axis on the three basis vectors

ej (j = 1, 2, 3) (e.g. for θ = π6

). The image vectors e′j of the basis vectors ej yield the columnsof the sought rotation matrix Rθ.

(b) It can be shown that for a general direction n = (n1, n2, n3)T of matrix elements of the

rotation axis have the following form:

(Rθ(n))ij = δij cos θ + ninj(1− cos θ)− εijk nk sin θ (εijk = Levi-Civita-Tensor) .

Use this formula to find the three rotation matrices Rθ(ei) (i = 1, 2, 3) explictly. Are yourresults consistent with those from (a)?

(c) Write down the following rotation matrices explicitly, and compute and scetch their effect onthe vector v = (1, 0, 1)T :

(i) A = Rπ(e3) , (ii) B = Rπ2( 1√

2(e3 − e1)) .

(d) Rotation matrices form a group. Use A and B from (c) to illustrate that this group is notcommutative (in contrast to the two-dimensional case!).

(e) Show that a general rotation matrix R satisfies the relation Tr(R) = 1 + 2 cos θ, where the‘trace’ of a matrix R is defined by Tr(R) =

∑i(R)

ii.

(f) The product of two rotation matrices is again a rotation matrix. Consider the product C = ABof the two matrices from (c), and find the corresponding unit vector n and rotation angle θ.Hint: these are uniquely defined only up to an arbitrary sign, since Rθ(n) and R−θ(−n) describethe same rotation. (To be concrete, fix this sign by choosing the component n2 positive.) |θ|and |ni| are fixed by the trace and the diagonal elements of the rotation matrix, respectively;their relativ sign is fixed by the off-diagonal elements. [Check your result: n2 = 1/

√3.]

Homework Problem 4: Basis transformations in E2 [4]Points: (a)[0.5](M); (b)[0.5](M); (c)[0.5](E); (d)[0.5](E); (e)[0.5](M); (f)[0.5](M); (g)[0.5](E); (h)[0.5](E)

Remark on notation: For this problem we denote vectors in euclidean space E2 using hats (e.g. vj,x, y, e1 ∈ E2). Their components with respect to a given basis are vectors in R2 and are writtenwithout hats (e.g. x, y ∈ R2).

Consider two bases for the Euclidean vector space E2, one old {vj}, and one new {v′i}, with

v1 =15v′1 +

35v′2 , v2 = −6

5v′1 +

25v′2 .

(a) The relation vj = v′itij expresses the old basis in terms of the new basis. Find the transfor-

mation matrix T = (tij).

5

Page 6: Sheet 07.5: Matrices II: Inverse, Basis Transformation · PDF file · 2016-08-16... Gaussian elimination and matrix inversion [4] ... Find the matrix T =1, and use the inverse transformation

(b) Find the matrix T−1, and use the inverse transformation v′j = vi(t−1)ij to express the new

basis in terms of the old basis.

(c) Let x be a vector with components x = (2,−12)T in the old basis. Find its components x′ in

the new basis.

(d) Let y by a vector with components y′ = (−3, 1)T in the new basis. Find its components y inthe old basis.

(e) Let A be the linear map defined by v1A7→ 1

3(v1 − 2v2) and v2

A7→ −13(4v1 + v2). First find

the matrix representation A of this map in the old basis, then use a basis transformation tofind its matrix representation A′ in the new basis. [Check your result: (A′)21 =

23.]

(f) Let z be the image vector onto which the vector x is mapped by A, i.e. xA7→ z. Find its

components z with respect to the old basis by using A, and its components z′ with respectto the new basis by using A′. Are your results for z and z′ consistent? [Check your result:z′ = 1

3(5, 1)T .]

(g) Now make the choice v1 = e1 + e2 and v2 = 2e1 − e2 for the old basis, where e1 = (1, 0)T

and e2 = (0, 1)T are the standard basis vectors on E2. What are the components of v′1, v′2,x and z in the standard basis E2?

(h) Make a sketch (with e1 and e2 as unit vectors in the horizontal and vertical directions re-spectively), showing the old and new basis vectors, as well as the vectors x and z. Are thecoordinates of these vectors, discussed in (c) and (f), consistent with your sketch?

Homework Problem 5: Basis transformations and linear maps [6]Points: (a)[1](M); (b)[1](E); (c)[1](E); (d)[1](M); (e)[1](M); (f)[1](M)

Consider the following three linear transformations in R3, using the standard basis {e1, e2, e3}.

A : Rotation around the first axis by the angle θ1 = −π3

in the right-handed sense, i.e. a left-handedrotation.

B : Dilation of the first and second axes, by the factors s1 = 2 and s2 = 4 respectively.

C : A reflection in the 2,3-plane.

(a) Find the matrix representations (using the standard basis) of A, B, C. Which of these trans-formations commute with each other (i.e. for which pairs of matrices does T1T2 = T2T1)?

(b) What is the image y = CAx of the vector x = (1, 1, 1)T under the transformation CA?

(c) Find the vector z, whose image under the composition of all three transformations , D =C ·B · A, gives y. [Note: D−1 = A−1B−1C−1.]

(d) Now consider a new basis {v′i}, defined by a rotation and reflection CA of the standard basis,

v′iCA7→ ei. [Caution: in the sample the order was reversed!] Sketch the old and new bases in

the same picture. [Note: The new basis vectors are a left handed system! Why?] Find thetransformation matrix T , and specify the matrix elements of the transformation between theold and the new basis, with ej = v′it

ij.

6

Page 7: Sheet 07.5: Matrices II: Inverse, Basis Transformation · PDF file · 2016-08-16... Gaussian elimination and matrix inversion [4] ... Find the matrix T =1, and use the inverse transformation

(e) In the {v′i}-Basis let the vectors z and y be represented by z = v′iz′i and y = v′iy

′i. Find thecorresponding components z′ = (z′1, z′2, z′3)T and y′ = (y′1, y′2, y′3)T .

(f) Let D′ denote the representation of D in the new Basis. Find D′ by an appropriate Transfor-mation of the Matrix D, and use the result to find the image y′ of z′ under D′. (Does theresult match the one from (e)?).

Homework Problem 6: Triple Lorentz integral via transformation of variables [2]Points: [2](M)

Calculate the following triple Lorentz integral (with a, b, c, d > 0, a, b, c, d ∈ R):

I =

ˆR3

dx dy dz1

[(xd+ y)2 + a2]· 1

[(y + z − x)2 + b2]· 1

[(y − z)2 + c2]

Hint: Use the change of variables u = (xd+y)/a, v = (y+ z−x)/b, w = (y− z)/c and calculate

the Jacobian determinant using J =∣∣∣∂(u,v,w)∂(x,y,z)

∣∣∣−1. You may use´∞−∞ dx(x2 + 1)−1 = π. [Check

your result: if a = b = c = π, d = 2, then I = 15.]

Homework Problem 7: Matrixinversion (Bonus) [0]Points: (a)[1](E); (b)[2](M)

Let Mn be an n× n matrix with matrix elements (Mn)ij = mδij + δi+1,j, with i, j = 1, . . . , n.

(a) Find the inverse matrices M−12 and M−1

3 . Verify in both cases that M−1n Mn = 1.

(b) Use the results from (a) to formulate a guess at the form of the inverse matrix M−1n for

arbitrary n. Check your guess by calculating M−1n Mn.

(c) Give a compact formula for the matrix elements (M−1n )ij. Check its validity by showing that∑

l(M−1n )il(Mn)

lj = δij holds, by explicitly performing the sum on l.

[Total Points for Homework Problems: 23]

7