logo back up home forward   further reading more topics »

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

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to the software project, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

Matlab.

Can you help?

Please send me any improvements to here. I would appreciate ideas to make the pages more useful including error correction, ideas for new pages, improvements to wording. It helps if you quote the full URL of the page.

 

Terminology and Notation

Specific to this page here:

 

program

I am working on a project which uses these principles, if you would like to help me with this you are welcome to join in, here:

http://sourceforge.net/projects/mjbworld/

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

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