To see that composition of two rotations about different coordination axes is equivalent to a single rotation about a fixed direction. M=[1 2 3; 4 5 6] Creates a certain 2 times 3 matrix and calls it M. Use either spaces or commas to separate elements of a row and use semi-colons to separate rows. a=[1 2 3] Create a vector and calls it a. norm(a) Computes the length of vector a. dot(a, b) Computes dot product of vectors a and b. M*N If M and N are matrices, the automatically uses matrix multiplication to take the product. Result is stored in variable and which will be overwritten. A=M*N As above, but result is stored in variable A for later use. Recommendation. rref (M) Computes reduced row echelon form of matrix M in a single step (no user input required, unlike rr (M)) To store result in variable A type A=rref (M) instead. Acos(x) Takes arccos (inverse cosine) of x. The answer will be in radians. Let T_1(theta_1) be the linear transformation that rotates any vector in R^3 through an angle theta_1 in a right-handed sense about the x-axis (so if your right thumb points along the positive x-axis, the rotation is in the direction that your fingers curl). It will have matrix [T_1(theta_1)]= [1 0 0 0 cos theta_1 sin theta_1 0 -sintheta_1 cos theta_1] An important property of this on is that it leaves any vector parallel to the x_1-axis unchanged, as you would expect. You can easily check this by that confirming that [T_1(theta_1)][x_1 0 0] = [x_1 0 0] By way of contrast, any vector v lying in the x_2x_3-plane (the plane whose equation can be written x_1 = 0) is rotated through the angle theta_1, while remaining in the x_2x_3-plane. To see this, define the vector v whose components are given by the column matrix: [v_1 v_2 v_3] = [T_1(theta_1)][0 x_2 x_3] If you compute v_1, it will be zero, so v lies in the x_2x_3-plane, as claimed. Moreover, if you take the dot product of v with the original vector (0, x_2, x_3) and divide by the length of each vector, you will get the cosine of the angle between these two vectors. Notice that the length of any vector is unchanged by T_1(theta_1). Indeed, an important property of all rotations is that they leave lengths of vectors unchanged. We can consider this to be one of the defining properties of rotations. Thus, a linear transformation T:R" rightarrow R" is called a rotation only if the length of the vector v = T(x) equals the length of x for every x in the domain. This alone doesn't distinguish a rotation, since reflections also have this property. But if we combine this with the property that rotations leave exactly one line unchanged, namely the axis, then we have a definition of what we mean by rotation. We next determine what axis this rotation is about. To do this, notice that the vector w parallel to the axis of rotation must be left unchanged by the rotation, so w will be a solution of the system of equations A[w]=w, which we rewrite as (A - I)[w] = 0 where I is the identity matrix. Solve this system by performing row reduction of the matrix (A-I). Write the parametric equations of the line through the origin parallel to the w direction. This line is the axis of the rotation. To see that composition of two rotations about different coordination axes is equivalent to a single rotation about a fixed direction. M=[1 2 3; 4 5 6] Creates a certain 2 times 3 matrix and calls it M. Use either spaces or commas to separate elements of a row and use semi-colons to separate rows. a=[1 2 3] Create a vector and calls it a. norm(a) Computes the length of vector a. dot(a, b) Computes dot product of vectors a and b. M*N If M and N are matrices, the automatically uses matrix multiplication to take the product. Result is stored in variable and which will be overwritten. A=M*N As above, but result is stored in variable A for later use. Recommendation. rref (M) Computes reduced row echelon form of matrix M in a single step (no user input required, unlike rr (M)) To store result in variable A type A=rref (M) instead. Acos(x) Takes arccos (inverse cosine) of x. The answer will be in radians. Let T_1(theta_1) be the linear transformation that rotates any vector in R^3 through an angle theta_1 in a right-handed sense about the x-axis (so if your right thumb points along the positive x-axis, the rotation is in the direction that your fingers curl). It will have matrix [T_1(theta_1)]= [1 0 0 0 cos theta_1 sin theta_1 0 -sintheta_1 cos theta_1] An important property of this on is that it leaves any vector parallel to the x_1-axis unchanged, as you would expect. You can easily check this by that confirming that [T_1(theta_1)][x_1 0 0] = [x_1 0 0] By way of contrast, any vector v lying in the x_2x_3-plane (the plane whose equation can be written x_1 = 0) is rotated through the angle theta_1, while remaining in the x_2x_3-plane. To see this, define the vector v whose components are given by the column matrix: [v_1 v_2 v_3] = [T_1(theta_1)][0 x_2 x_3] If you compute v_1, it will be zero, so v lies in the x_2x_3-plane, as claimed. Moreover, if you take the dot product of v with the original vector (0, x_2, x_3) and divide by the length of each vector, you will get the cosine of the angle between these two vectors. Notice that the length of any vector is unchanged by T_1(theta_1). Indeed, an important property of all rotations is that they leave lengths of vectors unchanged. We can consider this to be one of the defining properties of rotations. Thus, a linear transformation T:R" rightarrow R" is called a rotation only if the length of the vector v = T(x) equals the length of x for every x in the domain. This alone doesn't distinguish a rotation, since reflections also have this property. But if we combine this with the property that rotations leave exactly one line unchanged, namely the axis, then we have a definition of what we mean by rotation. We next determine what axis this rotation is about. To do this, notice that the vector w parallel to the axis of rotation must be left unchanged by the rotation, so w will be a solution of the system of equations A[w]=w, which we rewrite as (A - I)[w] = 0 where I is the identity matrix. Solve this system by performing row reduction of the matrix (A-I). Write the parametric equations of the line through the origin parallel to the w direction. This line is the axis of the rotation