# Conjugate matrix

This topic is 4856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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 on other sites
The complex conjugate of a real number is just that real number.

##### Share on other sites
But that would mean conjugating a matrix of floats would be like doing nothing... I guess that makes my job easier.

##### Share on other sites
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 on other sites
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 on other sites
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.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 11
• 15
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
634149
• Total Posts
3015829
×