dcosborn 674 Report post Posted October 7, 2005 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? 0 Share this post Link to post Share on other sites
SiCrane 11839 Report post Posted October 7, 2005 The complex conjugate of a real number is just that real number. 0 Share this post Link to post Share on other sites
dcosborn 674 Report post Posted October 7, 2005 But that would mean conjugating a matrix of floats would be like doing nothing... I guess that makes my job easier. 0 Share this post Link to post Share on other sites
Troll 246 Report post Posted October 7, 2005 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? 0 Share this post Link to post Share on other sites
dcosborn 674 Report post Posted October 7, 2005 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. 0 Share this post Link to post Share on other sites
jyk 2095 Report post Posted October 8, 2005 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. 0 Share this post Link to post Share on other sites