# 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

 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

(symmetric)