Maths - Matrix algebra - 4D arithmatic

The following calculator allows you to calculate 4x4 matrix arithmetic. Enter the values into the matrix into the top two matries and then press "+ - or * " to display the result in the bottom matrix:

 

 

=

Matrix Addition

To add matrices just add the corresponding elements, for 4x4 matrices then,

a00 + b00 a01 + b01 a02 + b02 a03 + b03
a10 + b10 a11 + b11 a12 + b12 a13 + b13
a20 + b20 a21 + b21 a22 + b22 a23 + b23
a30 + b30 a31 + b31 a32 + b32 a33 + b33
=
a00 a01 a02 a03
a10 a11 a12 a13
a20 a21 a22 a23
a30 a31 a32 a33
+
b00 b01 b02 b03
b10 b11 b12 b13
b20 b21 b22 b23
b30 b31 b32 b33

Matrix Subtraction

To subtract matrices just subtract the corresponding elements, for 4x4 matrices then,

a00 - b00 a01 - b01 a02 - b02 a03 - b03
a10 - b10 a11 - b11 a12 - b12 a13 - b13
a20 - b20 a21 - b21 a22 - b22 a23 - b23
a30 - b30 a31 - b31 a32 - b32 a33 - b33
=
a00 a01 a02 a03
a10 a11 a12 a13
a20 a21 a22 a23
a30 a31 a32 a33
-
b00 b01 b02 b03
b10 b11 b12 b13
b20 b21 b22 b23
b30 b31 b32 b33

Matrix Multiplication

The multiplication of two 4x4 matrices is:

ma00*mb00 + ma01*mb10 + ma02*mb20 + ma03*mb30 ma00*mb01 + ma01*mb11 + ma02*mb21 + ma03*mb31 ma00*mb02 + ma01*mb12 + ma02*mb22 + ma03*mb32 ma00*mb03 + ma01*mb13 + ma02*mb23 + ma03*mb33
ma10*mb00 + ma11*mb10 + ma12*mb20 + ma13*mb30 ma10*mb01 + ma11*mb11 + ma12*mb21 + ma13*mb31 ma10*mb02 + ma11*mb12 + ma12*mb22 + ma13*mb32 ma10*mb03 + ma11*mb13 + ma12*mb23 + ma13*mb33
ma20*mb00 + ma21*mb10 + ma22*mb20 + ma23*mb30 ma20*mb01 + ma21*mb11 + ma22*mb21 + ma23*mb31 ma20*mb02 + ma21*mb12 + ma22*mb22 + ma23*mb32 ma20*mb03 + ma21*mb13 + ma22*mb23 + ma23*mb33
ma30*mb00 + ma31*mb10 + ma32*mb20 + ma33*mb30 ma30*mb01 + ma31*mb11 + ma32*mb21 + ma33*mb31 ma30*mb02 + ma31*mb12 + ma32*mb22 + ma33*mb32 ma30*mb03 + ma31*mb13 + ma32*mb23 + ma33*mb33

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).

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.