Samer Adeeb

Linear Maps between vector spaces: Examples and Problems

Examples and Problems

Example 1

Consider the symmetric matrix:

    \[ M=\left(\begin{matrix}1&1&0\\1&1&0\\0&0&1\end{matrix}\right) \]

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


Since M is symmetric, therefore, M=M^T. The determinant of M 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, \det{M}=0. The kernel of M can be obtained by finding the possible forms for the vector x that would satisfy the following equation:

    \[ Mx=0\Rightarrow\left(\begin{matrix}1&1&0\\1&1&0\\0&0&1\end{matrix}\right)\left(\begin{array}{c}x_1\\x_2\\x_3\end{array}\right)=0 \]


    \[ x_1+x_2=0\qquad x_1+x_2=0\qquad x_3=0 \]

By setting x_1=\alpha, we have x_2=-\alpha. Therefore, the kernel of M has the form:

    \[ \ker{M}=\left\{x=\left(\begin{array}{c}\alpha\\-\alpha\\0\end{array}\right)\bigg| \alpha\in\mathbb{R}\right\} \]

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

    \[ \det{M-\lambda I}=0\Rightarrow \det\left(\begin{matrix}1-\lambda&1&0\\1&1-\lambda&0\\0&0&1-\lambda\end{matrix}\right)=0 \]


    \[ (1-\lambda)^3-(1-\lambda)=0\Rightarrow \lambda^3-3\lambda^2+2\lambda=0\Rightarrow \lambda (\lambda -2)(\lambda -1)=0 \]

Therefore, the possible three eigenvalues are: \lambda_1=0, \lambda_2=1, and \lambda_3=2. Note that since M is not invertible, \lambda=0 is automatically an eigenvalue for M.

The eigenvector ev_1 corresponding to the eigenvalue \lambda_1=0 can be found as follows:

    \[ M(ev_1)=0 (ev_1)   \]

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

    \[ ev_1=\left(\begin{array}{c}\frac{1}{\sqrt{2}}\\\frac{-1}{\sqrt{2}}\\0\end{array}\right) \]

The eigenvector ev_2 corresponding to the eigenvalue \lambda_2=1 can be found as follows:

    \[ M(ev_2)=1 (ev_2) \Rightarrow \left(\begin{matrix}1&1&0\\1&1&0\\0&0&1\end{matrix}\right)\left(\begin{array}{c}{ev_2}_1\\{ev_2}_2\\{ev_2}_3\end{array}\right)=\left(\begin{array}{c}{ev_2}_1\\{ev_2}_2\\{ev_2}_3\end{array}\right) \]

Therefore, we have the following three equations:

    \[ {ev_2}_1+{ev_2}_2-{ev_2}_1=0\Rightarrow {ev_2}_2=0 \]

    \[ {ev_2}_1+{ev_2}_2-{ev_2}_2=0\Rightarrow {ev_2}_1=0 \]

    \[ {ev_2}_3={ev_2}_3 \]

Therefore, the normalized components of the second eigenvector are:

    \[ ev_2=\left(\begin{array}{c}0\\0\\1\end{array}\right) \]

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

    \[ M(ev_3)=2 (ev_3) \Rightarrow \left(\begin{matrix}1&1&0\\1&1&0\\0&0&1\end{matrix}\right)\left(\begin{array}{c}{ev_3}_1\\{ev_3}_2\\{ev_3}_3\end{array}\right)=2\left(\begin{array}{c}{ev_3}_1\\{ev_3}_2\\{ev_3}_3\end{array}\right) \]

Therefore, we have the following three equations:

    \[ {ev_3}_1+{ev_3}_2-2{ev_3}_1=0\Rightarrow {ev_3}_2-{ev_3}_1=0 \]

    \[ {ev_3}_1+{ev_3}_2-2{ev_3}_2=0\Rightarrow {ev_3}_1-{ev_3}_2=0 \]

    \[ {ev_3}_3=2{ev_3}_3 \Rightarrow {ev_3}_3=0 \]

Therefore, the normalized components of the third eigenvector are:

    \[ ev_3=\left(\begin{array}{c}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\\0\end{array}\right) \]

The coordinate system in which the representation of the matrix M is diagonal is the coordinate system made of the three normalized eigenvectors of M. Setting B'=\{ev_3,-ev_1,ev_2\}, the coordinate transformation matrix Q has the form:

    \[ Q=\left(\begin{matrix}\frac{1}{\sqrt{2}}&\frac{1}{\sqrt{2}}&0\\\frac{-1}{\sqrt{2}}&\frac{1}{\sqrt{2}}&0\\0&0&1\end{matrix}\right) \]

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

    \[ M'=QMQ^T=\left(\begin{matrix}2&0&0\\0&0&0\\0&0&1\end{matrix}\right) \]

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 Q.
View Mathematica Code:

M = {{1, 1, 0}, {1, 1, 0}, {0, 0, 1}};
Mt = Transpose[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 x=\{1,1,1\}, u=\{0.6,0.8,0\}, v=\{-0.8,0.6,0\}, and w=\{0,0,1\}. Consider the linear map represented by the matrix:

    \[ M=\left(\begin{matrix}2&1&0\\1&5&2\\2&-1&3\end{matrix}\right) \]

  • Find the components of the vector y, the image of the vector x under the linear map M.
  • Show that the vectors u, v, and w form an orthonormal basis set.
  • Find the components of x', y' and M' if the basis set B'=\{u,v,w\} is chosen for the coordinate system.

The components of y are:

    \[ y=Mx=\{3,8,4\} \]

The vectors u, v, and w are orthogonal to each other and the norm of each is equal to 1. In addition, the order u, v, and w follows the right hand orientation. Setting B'=\{u,v,w\} the coordinate transformation matrix is:

    \[ Q=\left(\begin{matrix}u\cdot e_1&u\cdot e_2&u\cdot e_3\\v\cdot e_1&v\cdot e_2&v\cdot e_3\\w\cdot e_1&w\cdot e_2&w\cdot e_3\end{matrix}\right)=\left(\begin{matrix}0.6&0.8&0\\-0.8&0.6&0\\0&0&1\end{matrix}\right) \]

Therefore, the components of the vectors x', y', and the matrix M' are:

    \[ x'=Qx=\{1.4,-0.2,1\}\qquad y'=Qy=\{8.2,2.4,4\} \]

    \[ M'=QMQ^T=\left(\begin{matrix}4.88&1.16&1.6\\1.16&2.12&1.2\\0.4&-2.2&3\end{matrix}\right) \]

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

Example 3

In the following code, the rotation matrix Q\in\mathbb{M}^2 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 u=\{2,2\} after rotation and that the rotation angle between u and its image v is exactly 20 degrees.
View Mathematica Code:

(*The following is a rotation matrix using the angle Pi/6 in radians*)  
(*The following is a rotation matrix using 20 degrees*)  


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:

(*The following line stores the array of 4 vertices in the variable Points*)  
(*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*)
(*The following lines define two polygons c and c2 using the vertices defined in the variable Points and Points2*)  
(* The following line views the objects c and c2 with the default graphics formatting*)  
(*The following line views the objects while applying specific graphics formatting*)  

Example 5

The function “RotationMatrix[angle,vector]” can be used to create a rotation matrix create Q\in\mathbb{M}^3 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 Q with an angle of 60 degrees around the vector e_1=\{1,0,0\} is first defined. Then a unit cube is created and transformed by a geometric transformation of the original cube.
View Mathematica Code:

(*Viewing the two objects using the default graphics formatting*)  
(*Viewing the two objects using a specific formatting*)  


Example 6

In the following code, the rotation matrices Q_x, Q_y, and Q_z defined as rotations around e_1, e_2, and e_3, respectively, are created. A cuboid is then defined with opposite corners at \{0,0,0\}, and \{3,2,1\}. The function “Manipulate[]” is used to view the cuboid before and after applying the rotations Q_1 = Q_xQ_yQ_z (blue cuboid) and Q_2 =Q_zQ_yQ_x (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 Q_1 on a vector is equivalent to rotating the vector first by Q_z, then by Q_y and finally by Q_x. The resulting vector is different if Q_2 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:
(*In gray tones*)
(*In colour*)  


  1. Show that a matrix M\in\mathbb{M}^3 is not invertible if and only if 0 is an eigenvalue for M. In this case, what can you say about the set \ker{M}.
  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:

        \[ \left(\begin{matrix}1&1\\-1&-1\end{matrix}\right)\qquad \left(\begin{matrix}1&1\\0&-1\end{matrix}\right)\qquad \left(\begin{matrix}5&0&0\\0&2&-1\\1&2&5\end{matrix}\right)\qquad \left(\begin{matrix}5&0&0\\0&2&-1\\10&2&-1\end{matrix}\right) \]

  3. Consider the vectors x=\{1,0,0\}, y=\{0,1,0\}, and z=\{1,1,1\}. 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 M_a, and M_b defined below. Comment on the results.

        \[ M_a=\left(\begin{matrix}1.1&0.1&0\\0&0.9&0\\0&0&0.9\end{matrix}\right)\qquad M_b=\left(\begin{matrix}0&1.1&0\\0&1&0\\0&0&1\end{matrix}\right) \]

  4. Chose a value for M_{11} in the following matrices so that each matrix is not invertible. Then, find the kernel in each case:

        \[ M_a=\left(\begin{matrix}M_{11}&5&5\\-3&5&-1\\0&2&-1\end{matrix}\right)\qquad M_b=\left(\begin{matrix}M_{11}&2&3&1\\-1&-2&1&-2\\1&3&1&-5\\5&2&1&7\end{matrix}\right) \]

  5. 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 \frac{2\pi}{10} between each copy. Finally, use the graphics command to view the 10 polygons you drew.
  6. 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 B=\{e_1,e_2\}. Find the coordinates of the vertices in the coordinate system defined by the basis set B'=\{e'_1,e'_2\}.
  7. 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.
  8. Verify that the following matrix is an orthogonal matrix, and specify whether it is a rotation or a reflection.

        \[ Q=\left(\begin{matrix}\frac{3}{4}&-\frac{\sqrt{3}}{4}&\frac{1}{2}\\\frac{3\sqrt{3}}{8}&\frac{5}{8}&-\frac{\sqrt{3}}{4}\\-\frac{1}{8}&\frac{3\sqrt{3}}{8}&\frac{3}{4}\end{matrix}\right) \]

  9. Find the components Q_{11}, Q_{12}, and Q_{13} so that the following is a rotation matrix:

        \[ Q=\left(\begin{matrix}Q_{11}&Q_{12}&Q_{13}\\\frac{3}{8}+\frac{\sqrt{3}}{4}&\frac{3}{4}-\frac{\sqrt{3}}{8}&-\frac{1}{4}\\\frac{1}{4}-\frac{3\sqrt{3}}{8}&\frac{3}{8}+\frac{\sqrt{3}}{4}&\frac{\sqrt{3}}{4}\end{matrix}\right) \]

  10. Find the components Q_{11}, Q_{12}, and Q_{13} so that the following is a reflection matrix:

        \[ Q=\left(\begin{matrix}Q_{11}&Q_{12}&Q_{13}\\\frac{3}{8}+\frac{\sqrt{3}}{4}&\frac{3}{4}-\frac{\sqrt{3}}{8}&-\frac{1}{4}\\\frac{1}{4}-\frac{3\sqrt{3}}{8}&\frac{3}{8}+\frac{\sqrt{3}}{4}&\frac{\sqrt{3}}{4}\end{matrix}\right) \]

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

        \[ Q=\left(\begin{matrix}0.1&0.2&Q_{13}\\0.1&Q_{22}&Q_{23}\\Q_{31}&Q_{32}&Q_{33}\end{matrix}\right) \]

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

        \[ Q=\left(\begin{matrix}0.1&0.2&Q_{13}\\0.1&Q_{22}&Q_{23}\\Q_{31}&Q_{32}&Q_{33}\end{matrix}\right) \]

  13. Consider the orthonormal basis set B=\{e_1,e_2,e_3\} and the matrix M:

        \[ M=\left(\begin{matrix}1&5&-2\\2&2&3\\-5&2&1\end{matrix}\right) \]

    • Let a=\{1,1,2\}, b=\{-1,1,0\}. Verify that a\cdot b=0 and find the vector c that is orthogonal to both a, and b. Find a new orthonormal basis set B' using the normalized vectors of a, b, and c.
    • Find the components of the matrix M' in the new orthonormal basis set B'.
    • Find the three invariants of M and M' and verify that they are equal.
    • Find the eigenvalues of M and M' and verify that they are equal.
    • Find the components of the eigenvectors of M and the eigenvectors of M' and comment on whether they are the same vectors or not.
  14. Consider the orthonormal basis set B=\{e_1,e_2,e_3\} and the matrix M:

        \[ M=\left(\begin{matrix}3&0&0\\0&2&1\\0&0&4\end{matrix}\right) \]

    If the orthonormal basis set B'=\{-e_2,e_1,e_3\} is used as the coordinate system, find the components of M' in the new coordinate system.

  15. Consider the symmetric matrix S:

        \[ S=\left(\begin{matrix}1&0&-2\\0&2&0\\-2&0&1\end{matrix}\right) \]

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

        \[ \left(\begin{matrix}1&0&-2\\0&2&0\\-2&0&1\end{matrix}\right)\qquad \left(\begin{matrix}1&0&2\\0&2&0\\2&0&1\end{matrix}\right) \qquad \left(\begin{matrix}1&0&-2\\0&2&0\\-2&0&0\end{matrix}\right)\qquad \left(\begin{matrix}-1&0&-2\\0&2&0\\-2&0&1\end{matrix}\right) \]

  17. Let a, b, and c\in\mathbb{R}^3 be three vectors that are linearly independent. Using the properties of the dot product, construct an orthonormal basis set as a function of a, b, and c. (The construction is referred to as: Gram-Schmidt Process)
  18. Let a,b\in\mathbb{R}^3. Find an example of a matrix M\in\mathbb{M}^3 such that M(a\times b)\neq Ma\times Mb. Then, show that if Q\in\mathbb{R}^3 is a rotation matrix, then Q(a\times b)=Qa\times Qb.
  19. Using Einstein summation convention, and assuming that the underlying space is the Euclidean space \mathbb{R}^3, show that the following relations hold true for the Kronecker Delta \delta_{ij} and the alternator \varepsilon_{ijk}:
    • \delta_{ii}=3.
    • \delta_{ik}\varepsilon_{ikm}=0.
    • \varepsilon_{iks}\varepsilon_{mks}=2\delta_{im}.
    • \varepsilon_{ikm}\varepsilon_{ikm}=6.
    • \varepsilon_{iks}\varepsilon_{mps}=\delta_{im}\delta_{kp}-\delta_{ip}\delta_{km}.
  20. Write the following expressions out in full assuming that the underlying space is the Euclidean space \mathbb{R}^3:
    • c=d_{ijkl}\delta_{jk}\delta_{il}.
    • b_i=(a_{ij}+a_{ji})c_j.
    • a_i=\varepsilon_{ijk}c_jd_k.
  21. Write the following expressions in a compact form using index notation and the Einstein summation convention:

          \[ \begin{split}c_{11}x_1+c_{12}x_2+c_{13}x_3 & =d_1\\c_{21}x_1+c_{22}x_2+c_{23}x_3&=d_2 \\ c_{31}x_1+c_{32}x_2+c_{33}x_3&=d_3\end{split} \]

    2. a=c_{11}x_1^2+c_{22}x_2^2+c_{33}x_3^2+(c_{12}+c_{21})x_1x_2+(c_{13}+c_{31})x_1x_3+(c_{23}+c_{32})x_2x_3.
    3. In the following expressions assume that \varepsilon=\varepsilon_{11}+\varepsilon_{22}+\varepsilon_{33}

          \[\begin{split} \sigma_{11}&=2\mu\varepsilon_{11}+\lambda\varepsilon\\ \sigma_{22}&=2\mu\varepsilon_{22}+\lambda\varepsilon\\ \sigma_{33}&=2\mu\varepsilon_{33}+\lambda\varepsilon\\ \sigma_{12}=\sigma_{21}&=2\mu\varepsilon_{12}=2\mu\varepsilon_{21}\\ \sigma_{13}=\sigma_{31}&=2\mu\varepsilon_{13}=2\mu\varepsilon_{31}\\ \sigma_{32}=\sigma_{23}&=2\mu\varepsilon_{23}=2\mu\varepsilon_{32} \end{split}\]

  22. 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.
  23. 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 C is a completely symmetric fourth order tensor, then: C_{1213}=C_{1132}=C_{1231}=C_{3211}\cdots etc.

  24. Show that if A and B are symmetric matrices, then AB is not necessarily a symmetric matrix. (Hint: Find a counter example). On the other hand, show that if A and B are symmetric matrices that have the same eigenvectors (also called “coaxial”), then AB and BA are symmetric.
  25. Show that if A\in\mathbb{M}^3 is a symmetric matrix, then \forall B\in\mathbb{M}^3, the matrix C=BAB^T is symmetric.
  26. Let A,B,C,I\in\mathbb{M}^n and I is the identity matrix. Using the algebraic structure of matrices, show that if BA=I and AC=I, then B=C. The matrix B is referred to as the inverse of A and is denoted A^{-1}.
  27. Let S\in\mathbb{M}^n be a symmetric matrix. Let \lambda_{min} and \lambda_{max} be the minimum and maximum eigenvalues of S. Show that \forall a\in\mathbb{R}^n:\lambda_{min}\leq \frac{a\cdot Sa}{a\cdot a}\leq \lambda_{max}. (The quantity \frac{a\cdot Sa}{a\cdot a} is referred to as the Rayleigh Quotient)
  28. Let A,B\in\mathbb{M}^n. Let S\in\mathbb{M}^n be an invertible symmetric matrix. Show the following:
    • (AB)^T=B^TA^T.
    • (S^T)^{-1}=(S^{-1})^T.
    • S^{-1} is symmetric.

Leave a Reply

Your email address will not be published. Required fields are marked *