SI460 Graphics RST Transform Cheat-Sheet v1.0 1 0 0 � 0 1 0� 0 0 1 Diagonal matrix. All non-zero elements occur along the diagonal. The “diagonal” are those elements whose row number equals their column number. Must be square. 1 0 �0 1 0 0 Identity matrix. A diagonal matrix whose diagonal elements all equal one. Often written as ‘I’. Transpose. The transpose AT of matrix A has the same numbers, but the rows are switched with the columns. For a diagonal matrix, AT=A. 𝑎 A=� 𝑑 Determinant. A value associated with a square matrix. The determinant of matrix A is written as det(A) or |A|. det(I) = 1 10 0 � � 0 5 0 0� 1 � 1 0 � 0 1 𝑎 𝑐 � , AT= �𝑏 𝑓 𝑐 𝑏 𝑒 𝑎 𝑏 A=� � 𝑐 𝑑 det(A)=ad-bc 𝑎 𝑏 𝑐 B=�𝑑 𝑒 𝑓 � 𝑔 ℎ 𝑖 det(B) = aei+bfg+cdh-ceg-bdi-afh Using matrix A to the right, det(A)= the area of a parallelogram described by vectors (a,b) and (c,d). 1 A=� 3 Inverse. The inverse A-1 of A is the matrix that satisfies AA-1=I. You can calculate the inverse of A if you know the determinant and cofactor of A. (Note – cofactors are complicated to calculate. You are not required to memorize their equation.) 2 −2 1 � , A-1= � � 4 1.5 −.5 A-1= 1 * Acofactor |𝐴| QT=Q-1, det(Q)=-1 or 1 QTQ = QQT = I Orthogonal matrix. A square matrix made up with real entries. Each row contains an orthonormal vector. (Vector length=1. x2+y2=1 or x2+y2+z2=1.) Its determinant = -1 or 1. Its transpose always equals its inverse. Rotational Matrix. Must be orthogonal. A matrix times a constant (n): A matrix times a matrix: A matrix plus a matrix: Matrix multiplication is associate: Matrix multiplication is distributive: Matrix multiplication is not commutative: � 𝑎 𝑐 � � 𝑎 𝑐 𝑛∗� 𝑎 𝑐 𝑒 𝑏 �∗� 𝑔 𝑑 𝑑 𝑒� 𝑓 𝑎 𝑐 𝑏 𝑛𝑎 �= � 𝑑 𝑛𝑐 𝑛𝑏 � 𝑛𝑑 𝑥 𝑎𝑥 + 𝑏𝑦 𝑏 � ∗ �𝑦 � = � � 𝑐𝑥 + 𝑑𝑦 𝑑 𝑓 𝑎𝑒 + 𝑏𝑔 �= � ℎ 𝑐𝑒 + 𝑑𝑔 𝑒 𝑏 �+� 𝑔 𝑑 𝑓 𝑎+𝑒 �= � ℎ 𝑐+𝑔 (AB)C = A(BC) A(B+C) = AB+AC AB != BA 𝑎𝑓 + 𝑏ℎ � 𝑐𝑓 + 𝑑ℎ 𝑏+𝑓 � 𝑑+ℎ SI460 Graphics RST Transform Cheat-Sheet v1.0 Type of Vector Rotate 2D, non-homogeneous (x, y) Rz(φ) = � 3D, non-homogeneous (x, y, z) Scale 𝑐𝑜𝑠φ −𝑠𝑖𝑛φ � 𝑠𝑖𝑛φ 𝑐𝑜𝑠φ 1 Rx(φ) = �0 0 S=� 0 0 𝑐𝑜𝑠φ −𝑠𝑖𝑛φ� 𝑠𝑖𝑛φ 𝑐𝑜𝑠φ 𝑐𝑜𝑠φ 0 𝑠𝑖𝑛φ 1 0 � Ry(φ) = � 0 −𝑠𝑖𝑛φ 0 𝑐𝑜𝑠φ 2D, homogeneous (x, y, 1) or (x, y, 0) 𝑐𝑜𝑠φ −𝑠𝑖𝑛φ 0 Rz(φ) = � 𝑠𝑖𝑛φ 𝑐𝑜𝑠φ 0� 0 0 1 𝑐𝑜𝑠φ −𝑠𝑖𝑛φ 0 Rz(φ) = � 𝑠𝑖𝑛φ 𝑐𝑜𝑠φ 0� 0 0 1 1 0 Rx(φ)=� 0 0 3D, homogeneous (x, y, z, 1) or (x, y, z, 0) 0 0 0 𝑐𝑜𝑠φ −𝑠𝑖𝑛φ 0 � 𝑠𝑖𝑛φ 𝑐𝑜𝑠φ 0 0 0 1 𝑐𝑜𝑠φ 0 Ry(φ)=� −𝑠𝑖𝑛φ 0 𝑆𝑥 0 Angle (deg) 0 30 45 60 90 cos 0 0� 𝑆𝑧 𝑆𝑥 S=� 0 0 0 𝑆𝑦 0 0 0� 1 sin 1 √3⁄2 ≈ .866 √2⁄2 ≈ .707 .5 0 n/a 0 𝑆𝑦 0 𝑐𝑜𝑠φ −𝑠𝑖𝑛φ 0 0 𝑠𝑖𝑛φ 𝑐𝑜𝑠φ 0 0 Rz(φ)=� � 0 0 1 0 0 0 0 1 Angle (rad) 0 π/6 π/4 π/3 π/2 0 � 𝑆𝑦 𝑆𝑥 S=� 0 0 𝑆𝑥 0 S=� 0 0 0 𝑠𝑖𝑛φ 0 1 0 0 � 0 𝑐𝑜𝑠φ 0 0 0 1 Translate 0 .5 √2⁄2 ≈ .707 √3⁄2 ≈ .866 1 0 𝑆𝑦 0 0 0 0 𝑆𝑧 0 n/a 0 0 � 0 1 1 0 T=�0 1 0 0 1 0 T=� 0 0 𝑇𝑥 𝑇𝑦� 1 0 0 𝑇𝑥 1 0 𝑇𝑦 � 0 1 𝑇𝑧 0 0 1