Sign in to follow this  
dcosborn

Conjugate matrix

Recommended Posts

dcosborn    674
I've been working on a set of matrix functions and I'm done all the basics except for finding the conjugate of a matrix. My linear algebra experience is extremely limited and, from what I can gather, to find the conjugate of a matrix I need to conjugate each of the elements as complex numbers. Therein lies the problem as I don't know how one would get a complex number (z = x + iy) from a single float. Anyone up for helping a math noob?

Share this post


Link to post
Share on other sites
Troll    246
Yes, the conjugate of a real matrix is the original matrix, so you don't have to do anything. Why did you think you need a conjugate function in the first place if you're not dealing with complex numbex numbers?

Share this post


Link to post
Share on other sites
dcosborn    674
Well I was just reading about linear algebra on many different sites, some of which were focused on general mathematics rather than 3D gamedev. I was actually implementing matrix inversion and I read that I needed to find the adjoint, which in turn requires the conjugate (if I remember right). I guess with my limited math experience I just got a bit lost. Anyway, I've tossed the conjugate and adjoint functions and used a simple transpose instead.

Share this post


Link to post
Share on other sites
jyk    2094
Quote:
Well I was just reading about linear algebra on many different sites, some of which were focused on general mathematics rather than 3D gamedev. I was actually implementing matrix inversion and I read that I needed to find the adjoint, which in turn requires the conjugate (if I remember right).
Are you sure it wasn't the classical adjoint? Matrix inverse can be formulated as adj(A)/|A|, where adj() is the classical adjoint and || is the determinant. It doesn't involve the conjugate or complex numbers (AFAIK).
Quote:
I guess with my limited math experience I just got a bit lost. Anyway, I've tossed the conjugate and adjoint functions and used a simple transpose instead.
Transpose is only equivalent to inverse in special cases, so it's not a substitute for general inversion. There are different ways to invert a matrix, but for small matrices (N = 2 through 4 and even a little higher), adj/det is a fairly standard method to use. For one thing, an in-place implementation is branchless (except perhaps for checking for singularity), which can be good for performance.

For larger matrices you can employ other methods, such as Gauss-Jordan elimination.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this