Java Script Linear Algebra I
By Marcus Kazmierczak

 

Enter your Matrix :



What do you wish to calculate :

   

Solution Matrix :



 

The Mathematics Behind It

Let A represent our 3x3 Matrix.

trace(A) The trace of a matrix is simply the summation of its main diagonal.
 
det(A)

The determinant of a matrix is not quite as simple. For a n x n matrix the definition of the determinant is as follows :

det(A) = Ê (±)a1j1 a2j2. . .anjn

where Ê is our summation over all permutations j1 j2 ... jn of the set S={1, 2, ..., n }. The sign is + or - according to whether the permutation is even or odd.

In our 3x3 case it is a little easier, and boils down to :

det(A) = aei + cdh + bfg - ceg - bdi - afh

where are matrix first row is a b c , 2nd row d e f, and 3rd row, g h i

 
adj(A)

The adjoint of A is the matrix whose i, and jth element is the cofactor Aji of aji

The cofactor of an element aij = (-1)i + j * det (A'). where A' is the matrix obtained from "omitting" the ith and jth rows.

 
inv(A)

The inverse of A is the matrix which when multiplied to A returns the identity matrix. The inverse was obtained using the Theorem :

Aadj(A) = det(A)In

Which when manipulated gives you : A-1 = (1 / det(A)) * adj(A)

 


 

 

On To : Java Script Linear Algebra Page II

 

E-Mail : marcus@mkaz.com