Maths - Types of 3 Dimensional Matrix Transforms

Here are some examples of 3 dimensional transforms and their corresponding 3x3 matrices.

I have noted whether the matrix is symmetric or anti-symmetric across the leading diagonal. As you can see, rotation contains the sum of both a symmetric and an anti-symmetric across the leading diagonal, reflection is symmetric across the leading diagonal.

1 0 0
0 1 0
0 0 1

Identity

(symmetric)

a 0 0
0 a 0
0 0 a

Scale

(symmetric)

0 1 0
1 0 0
0 0 1

Swap x and y axes, which is the same as reflecting in a 45° line

(symmetric)

0 -1 0
1 0 0
0 0 1

Swap x and y axes and invert y, which is the same as rotating by 90° around z axis

(anti-symmetric)

cos(a) -sin(a) 0
sin(a) cos(a) 0
0 0 1

Rotate by a around z axis

(anti-symmetric)

1 0 0
0 1 0
0 0 -1
Reflection in z axis
t*x*x + c t*x*y - z*s t*x*z + y*s
t*x*y + z*s t*y*y + c t*y*z - x*s
t*x*z - y*s t*y*z + x*s t*z*z + c

Rotation around an axis x,y,z

For examples of 3D rotations see this page.

0 -z y
z 0 -x
-y x 0
Skew symmetric matrix, Matrix equivalent of vector cross multiplication, this transform generates a vector which is mutually perpendicular to both x,y,z and the input vector.
-x2 + z* z + y* y - 2 * x * y - 2 * x * z
- 2 * y * x -y2 + x*x + z*z - 2 * y * z
- 2 * z * x -2 * z * y -z2 + y*y + x*x

Reflection in line x,y,z (see this page)

(symmetric)

   
   
   
   
   
   
   

metadata block
see also:
Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover Mathematics for 3D game Programming - Includes introduction to Vectors, Matrices, Transforms and Trigonometry. (But no euler angles or quaternions). Also includes ray tracing and some linear & rotational physics also collision detection (but not collision response).

Other Math Books

Terminology and Notation

Specific to this page here:

 

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2017 Martin John Baker - All rights reserved - privacy policy.