logo back up home forward   further reading more topics »

Maths - Matrix algebra - Inverse 2x2

Prerequisites

The concepts are explained here:

Description

if

A=
m00 m01
m10 m11

then

A-1=
__1__
det
m11 -m01
-m10 m00

where det is the determinant for a 2x2 matrix this is:

det = m00*m11 - m01*m10

The following calculator allows you to calculate the inverse for a 2x2 matrix. Enter the values into the matrix and then press "calc inverse " to display the result:

Code

public final void invert(Matrix4d m1) {

double det=m1.m00*m1.m11 - m1.m01*m1.m10;
m00 = m1.m11/det;
m01 = -m1.m01/det;
m02 = -m1.m10/det;
m03 = m1.m00/det;
}

Further Information


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 Developing Games in Java

Other Math Books

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.

cover Dreamweaver HTML editing program.

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.