## Linear Maps between vector spaces: Examples and Problems

### Examples and Problems

#### Example 1

Consider the symmetric matrix:

Find , the determinant of , the kernel of , the eigenvalues and eigenvectors of , and find the coordinate transformation in which is diagonal.

##### Solution

Since is symmetric, therefore, . The determinant of can be obtained using the triple product of the row vectors. However, it is obvious that the first two vectors are linearly dependent (they are equal), therefore, . The kernel of can be obtained by finding the possible forms for the vector that would satisfy the following equation:

Therefore:

By setting , we have . Therefore, the kernel of has the form:

To find the eigenvalues of we find the possible values for that would make the matrix not invertible. In other words, we solve for that would satisfy:

Therefore:

Therefore, the possible three eigenvalues are: , , and . Note that since is not invertible, is automatically an eigenvalue for .

The eigenvector corresponding to the eigenvalue can be found as follows:

which is the same equation to find the vectors of the kernel. So, a normalized vector in the kernel would satisfy this equation. Therefore,

The eigenvector corresponding to the eigenvalue can be found as follows:

Therefore, we have the following three equations:

Therefore, the normalized components of the second eigenvector are:

Since is symmetric, the third eigenvector has to be normal to the first and second eigenvectors. So, we can simply find a vector normal to and . Or we can solve the equation:

Therefore, we have the following three equations:

Therefore, the normalized components of the third eigenvector are:

The coordinate system in which the representation of the matrix is diagonal is the coordinate system made of the three normalized eigenvectors of . Setting , the coordinate transformation matrix has the form:

Note that the order of the vectors in was chosen so that is a rotation matrix, i.e., the vectors of have to obey the right hand orientation. Therefore, the components of when using as the basis set are:

Study the following Mathematica code and note the various functions used for matrix manipulations. Note that the function “NullSpace” can be used to find the vectors in the kernel. The actual kernel is the span of these vectors. Matrix multiplication is performed using the “.” character. Note also that the command “Eigensystem” in Mathematica can be used to produce the list of eigenvalues, followed by the list of eigenvectors. Study the code to see how the eigenvectors can be extracted, normalized, and then used to form the matrix .
View Mathematica Code:

M = {{1, 1, 0}, {1, 1, 0}, {0, 0, 1}};
Mt = Transpose[M]
Det[M]
NullSpace[M]
a = Eigensystem[M]
ev1 = a[[2, 1]]/Norm[a[[2, 1]]]
ev2 = a[[2, 3]]/Norm[a[[2, 3]]]
ev3 = a[[2, 2]]/Norm[a[[2, 2]]]
Q = {ev1, ev2, ev3};
Q // MatrixForm
Mp = Q.M.Transpose[Q];
Mp // MatrixForm


#### Example 2

Consider the vectors , , , and . Consider the linear map represented by the matrix:

• Find the components of the vector , the image of the vector under the linear map .
• Show that the vectors , , and form an orthonormal basis set.
• Find the components of , and if the basis set is chosen for the coordinate system.
##### Solution

The components of are:

The vectors , , and are orthogonal to each other and the norm of each is equal to 1. In addition, the order , , and follows the right hand orientation. Setting the coordinate transformation matrix is:

Therefore, the components of the vectors , , and the matrix are:

View Mathematica Code:
x = {1, 1, 1};
M = {{2, 1, 0}, {1, 5, 2}, {2, -1, 3}};
Print["y=Mx"]
y = M.x;
y // MatrixForm
u = {3/5, 4/5, 0};
v = {-4/5, 3/5, 0};
w = {0, 0, 1.};
Norm[u]
Norm[v]
Norm[w]
u.v
u.w
v.w
Q = {u, v, w};
Q // MatrixForm
xp = Q.x;
Print["x'"]
xp // MatrixForm
yp = Q.y;
Print["y'"]
yp // MatrixForm
Mp = Q.M.Transpose[Q];
Print["M'"]
Mp // MatrixForm
Print["M'x'"]
Mp.xp // MatrixForm


#### Example 3

In the following code, the rotation matrix is defined using the function “RotationMatrix[angle]”. Notice that the angle input is automatically set at radians unless the command “Degree” is used. Because of the symbolic notation of Mathematica, the function FullSimplify[] is used to show that the rotation matrix preserves the norm of the vector after rotation and that the rotation angle between and its image is exactly 20 degrees.
View Mathematica Code:

(*The following is a rotation matrix using the angle Pi/6 in radians*)
Q=RotationMatrix[Pi/6];
(*The following is a rotation matrix using 20 degrees*)
Q=RotationMatrix[20Degree];
u={2,2};
v=Q.u;
Norm[u]
Norm[v]
FullSimplify[Norm[v]]
VectorAngle[u,v]
FullSimplify[VectorAngle[u,v]]


#### Example 4

In the following code, an array of 4 points is defined and used to draw a triangle. Then, a new array is calculated by applying a rotation of 60 degrees to every point and thus a new triangle rotated by 60 degrees is defined. Finally, two triangles are created using the Polygon function and viewed using the Graphics function.
View Mathematica Code:

th=60Degree;
Q=RotationMatrix[th];
(*The following line stores the array of 4 vertices in the variable Points*)
Points={{0,1},{5,1},{2,3},{0,1}};
(*The following line rotates each of the 4 elements in Points using the rotation matrix Q, then, forms a new array of 4 rotated vertices in the variable Points2. The new array is formed using the Table command*)
Points2=Table[Q.Points[[i]],{i,1,4}];
(*The following lines define two polygons c and c2 using the vertices defined in the variable Points and Points2*)
c=Polygon[Points];
c2=Polygon[Points2];
(* The following line views the objects c and c2 with the default graphics formatting*)
Graphics[{c,c2},Axes->True,AxesOrigin->{0,0}]
(*The following line views the objects while applying specific graphics formatting*)
Graphics[{Opacity[0.6],c,c2},Axes->True,AxesOrigin->{0,0},AxesStyle->{Directive[Bold,17],Directive[Bold,17]}]


#### Example 5

The function “RotationMatrix[angle,vector]” can be used to create a rotation matrix create that is a rotation around a particular vector. You can use two- or three-dimensional graphics objects to visualize the effect of the rotation matrices. For example, in the following code, a rotation matrix with an angle of 60 degrees around the vector is first defined. Then a unit cube is created and transformed by a geometric transformation of the original cube.
View Mathematica Code:

thx=60Degree
Qx=RotationMatrix[thx,{1,0,0}];
c=Cuboid[{0,0,0},{1,1,1}];
c1=GeometricTransformation[c,Qx]
(*Viewing the two objects using the default graphics formatting*)
Graphics3D[{c,,c1},Axes->True,AxesOrigin->{0,0,0}]
(*Viewing the two objects using a specific formatting*)
Graphics3D[{GrayLevel[.3,0.4],Specularity[White,2],EdgeForm[Thickness[0.005]],c,Specularity[White,6],EdgeForm[Thickness[0.01]],c1},Axes->True,AxesOrigin->{0,0,0},Lighting->"Neutral",AxesStyle->{Directive[Bold,13],Directive[Bold,13],Directive[Bold,13]}]


#### Example 6

In the following code, the rotation matrices , , and defined as rotations around , , and , respectively, are created. A cuboid is then defined with opposite corners at , and . The function “Manipulate[]” is used to view the cuboid before and after applying the rotations (blue cuboid) and (red cuboid). Copy and paste the code into your Mathematica software, and move the sliders to change the values of the rotation angles. The order of consecutive rotations is important. The application of on a vector is equivalent to rotating the vector first by , then by and finally by . The resulting vector is different if is applied.

View Mathematica Code:
Clear[thx, thy, thz]
Manipulate[Qx = RotationMatrix[thx, {1, 0, 0}];
Qy = RotationMatrix[thy, {0, 1, 0}];
Qz = RotationMatrix[thz, {0, 0, 1}];
c = Cuboid[{0, 0, 0}, {3, 2, 1}];
c1 = GeometricTransformation[c, Qx.Qy.Qz];
c2 = GeometricTransformation[c, Qz.Qy.Qx];
Graphics3D[{c, {Blue, c1}, {Red, c2}}, AxesStyle -> {Directive[Bold, 13], Directive[Bold, 13], Directive[Bold, 13]}, AxesLabel -> {"x", "y", "z"}, Axes -> True, AxesOrigin -> {0, 0, 0}], {thx, 0, 2 Pi}, {thy, 0, 2 Pi}, {thz, 0, 2 Pi}]


#### Example 7

In the following code, two reflection matrices are created using the “ReflectionMatrix[vector]” function. Reflection is applied across the plane perpendicular to the vector specified. The blue and red triangles are reflections across the planes passing through the origin and perpendicular to the blue and red arrow directions, respectively.

View Mathematica Code:
Q1=ReflectionMatrix[{1,0}]
Q2=ReflectionMatrix[{1,1}]
Points={{0,1},{5,1},{2,3},{0,1}};
Points1=Table[Q1.Points[[i]],{i,1,4}];
Points2=Table[Q2.Points[[i]],{i,1,4}];
L1=Arrow[{{-5,0},{5,0}}]
L2=Arrow[{{-5,-5},{5,5}}]
c=Polygon[Points];
c1=Polygon[Points1];
c2=Polygon[Points2];
(*In gray tones*)
(*In colour*)


#### Problems

1. Show that a matrix is not invertible if and only if is an eigenvalue for . In this case, what can you say about the set .
2. Find the determinant, the eigenvalues, and the eigenvectors of the following matrices. If a matrix is not invertible, then find its kernel. If a matrix is invertible, then, find its inverse:

3. Repeat the previous question for the following matrices:

4. Consider the vectors , , and . Find the volume of the parallelepiped formed by the three vectors. Also, find the volume of the parallelepiped formed when the three vectors are linearly mapped using the matrices , and defined below. Comment on the results.

5. Consider a parallelepiped with edges and where , , , and . Determine the new volume of the parallelpiped after a transformation of the space by the matrix :

Comment on the sign of the resulting volume.

6. Chose a value for in the following matrices so that each matrix is not invertible. Then, find the kernel in each case:

7. Use Mathematica Software to draw a two-dimensional polygon with five sides, and then use the table command to create 10 copies of the polygon rotated with an angle between each copy. Finally, use the graphics command to view the 10 polygons you drew.
8. The shown rectangle has a length of 2 units and height of 4 units. Find the coordinates of its vertices in the orthnormal basis set . Find the coordinates of the vertices in the coordinate system defined by the basis set .
9. The shown rectangle has a length of 2 units and height of 4 units. Find the coordinates of its vertices if the rectangle is rotated counterclockwise by the angle shown in the figure. Comment on the difference between the linear mapping used in this problem and that used in the previous problem.
10. Verify that the following matrix is an orthogonal matrix, and specify whether it is a rotation or a reflection.

11. Find the components , , and so that the following is a rotation matrix:

12. Find the components , , and so that the following is a reflection matrix:

13. Find two possible combinations for the missing components in so that it is a rotation matrix:

14. Find two possible combinations for the missing components in so that it is an orthogonal matrix associated with reflection:

15. Consider the orthonormal basis set and the matrix :

• Let , . Verify that and find the vector that is orthogonal to both , and . Find a new orthonormal basis set using the normalized vectors of , , and .
• Find the components of the matrix in the new orthonormal basis set .
• Find the three invariants of and and verify that they are equal.
• Find the eigenvalues of and and verify that they are equal.
• Find the components of the eigenvectors of and the eigenvectors of and comment on whether they are the same vectors or not.
16. Repeat the previous question with and:

17. Consider the orthonormal basis set and the matrix :

If the orthonormal basis set is used as the coordinate system, find the components of in the new coordinate system.

18. Consider the symmetric matrix :

• Find the eigenvalues and eigenvectors of .
• Find a new coordinate system such that the matrix of components in the new coordinate system is a diagonal matrix.
19. Identify the positive definite and semi-positive definite symmetric matrices in the following:

20. Find the missing values in the components of the orthogonal matrix so that it represents a change of basis while maintaining the proper orientation.

Then, find the components of the identity matrix when a coordinate transformation using is applied. Comment on the results.

21. Find the eigenvalues and eigenvectors of the following symmetric matrices and then perform the diagonalization process for each.

22. The figure below shows a square with dimension . Determine the transformation matrix applied to the object to produce the image shown.

23. Let , , and be three vectors that are linearly independent. Using the properties of the dot product, construct an orthonormal basis set as a function of , , and . (The construction is referred to as: Gram-Schmidt Process)
24. Let ,. Find an example of a matrix such that . Then, show that if is a rotation matrix, then .
25. Using Einstein summation convention, and assuming that the underlying space is the Euclidean space , show that the following relations hold true for the Kronecker Delta and the alternator :
• .
• .
• .
• .
• .
26. Write the following expressions out in full assuming that the underlying space is the Euclidean space :
• .
• .
• .
27. Write the following expressions in a compact form using index notation and the Einstein summation convention:
1.

2. .
3. In the following expressions assume that

28. Show that symmetric and antisymmetric matrices stay symmetric and antisymmetric, respectively, under any orthogonal coordinate transformation.
1. Using the definitions of symmetric and antisymmetric tensors without reference to components.
2. Using the component forms of symmetric and antisymmetric matrices.
29. In a three dimensional Euclidean vector space, how many independent components will the following tensors have:
• A “completely symmetric” third order tensor.
• A “completely symmetric” fourth order tensor.

“Completely symmetric” means that components having indices with the same numerical values are equal regardless of the order. For example, if is a completely symmetric fourth order tensor, then:

30. Show that if and are symmetric matrices, then is not necessarily a symmetric matrix. (Hint: Find a counter example). On the other hand, show that if and are symmetric matrices that have the same eigenvectors (also called “coaxial”), then and are symmetric.
31. Show that if is a symmetric matrix, then , the matrix is symmetric.
32. Let and is the identity matrix. Using the algebraic structure of matrices, show that if and , then . The matrix is referred to as the inverse of and is denoted .
33. Let be a symmetric matrix. Let and be the minimum and maximum eigenvalues of . Show that . (The quantity is referred to as the Rayleigh Quotient)
34. Let . Let be an invertible symmetric matrix. Show the following:
• .
• .
• is symmetric.
35. Let be a symmetric matrix. Let be another matrix. Find the restriction on to ensure that the matrix is symmetric, i.e., that . (Hint: in a coordinate system of the eigenvectors of the ratios between the off diagonal components of is equal to the ratios between the corresponding eigenvalues of )
36. As will be discussed later, the stress at a point can be described as a symmetric matrix with the following form:

Assume a change of coordinates described by the following rotation matrix

In the new coordinate system, the comonents of will have the following form:

If a vector representation of the stress is adopted as follows:

Then, show that the components of the vector after transformation are given by:

where has the following form: