Jump to content

Invert Matrix


alexnet

Recommended Posts

Hello! 

There is the following code and a very strange result which returns the function of invert. How does the invert function actually work for zero determinant matrices?
 

matrix3 matA = { {1,2,3}, {4,5,6}, {7,8,9} };

// Find the determinant of the matrix
// If the determinant value is zero, then an inverted matrix cannot be found for such a matrix.

int det = determinant(matA); // det == 0

matrix3 matB = invert(matA); // { {-0.75, 0.5, 0.25}, {-0.5, 0, -0.5}, {0.5833, 0.5, -0.083} }
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...