Maths - Matrix algebra - 2D arithmatic

The following calculator allows you to calculate 2x2 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 2x2 matrices and then,

a00 + b00 a01 + b01
a10 + b10 a11 + b11
=
a00 a01
a10 a11
+
b00 b01
b10 b11

Matrix Subtraction

To subtract matrices just subtract the corresponding elements, for 2x2 matrices and then,

a00 - b00 a01 - b01
a10 - b10 a11 - b11
=
a00 a01
a10 a11
-
b00 b01
b10 b11

Matrix Multiplication

For 2x2 matrices then,

a00*b00 + a01*b10 a00*b01 + a01*b11
a10*b00+ a11*b10 a10*b01 + a11*b11
=
a00 a01
a10 a11
b00 b01
b10 b11

This is worked out as follows: for each entry in the matrix we take the row from the first operand and the column from the second operand:

a00 a01
a10 a11
b00 b01
b10 b11
=
a00 a01
b00
b10
a00 a01
b01
b11
a10 a11
b00
b10
a10 a11
b01
b11

This single row times a single column is equivalent to the dot product:

a00 a01
a10 a11
b00 b01
b10 b11
=
a00*b00 + a01*b10 a00*b01 + a01*b11
a10*b00 + a11*b10 a10*b01 + a11*b11

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-2023 Martin John Baker - All rights reserved - privacy policy.