# Uses of Math

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

## Recommended Posts

hey. I just wanted to know the use of certain things in Computer graphics. -Determinants -Inverse of a Matrix -Basis

##### Share on other sites
I cannot think of a time when I have specifically used determinates or a nonstandard basis (i,j,k works fine for me), but linear algebra is definitely one of the most important math subjects for computer graphics. Linear algebra is used to transform vectors to different coordinate spaces and to perform rotations, translations, and scaling operations. Many of these operations are built-in so the programmer doesn't have to get too involved with tedious things like evaluating determinants.

##### Share on other sites
I know. I was just wondring. Its pretty obvious to me the use of matrices for transformations and such. but i took a linear algebra course, and a friend asked me the use of determinants in computer graphics and I really couldnt really tell him anything other then that they can be used to find the area of paralellograms.

##### Share on other sites
Determinants: You would use determinants primarily when finding the inverse of matrices using the cofactor method, up to a reasonable size (4x4 for instance). Otherwise you use the Gaussian method which doesn't directly involve the determinant, but for just computer graphics you're not usually going to be working with anything larger than a 4x4. I've personally used a variant of the cofactor method for determinants in order to build a generalized n-dimensional "cross product" operator, but that wasn't graphics related. I'm sure there are a few other applications I'm failing to remember at the moment.

Inverse of a Matrix: You use the inverse all the time :) Anytime you want to reverse a transformation, for instance, you need the inverse of the matrix. Granted, many matrices in computer graphics have special forms that allow you to take advantage of optimized inversion methods (i.e. A-1 = AT for a rotation matrix), but all the theory involves inverses. There are also hoards of times you would use matrix inverses outside of computer graphics, of course, but I won't go into those.

Basis: Surprisingly, I used custom basis a lot, primarily when designing algorithms that need to deal in subspaces of 3D. Many problems can be solved rather easily by choosing a clever basis and eliminating redundant dimensions. In computer graphics, you're likely only to use 3D orthogonal basis and move from one to another using the three primary transformations: translation, rotation, and scaling.

##### Share on other sites
Wow, Very nice post man, thank you.

##### Share on other sites
A few more ideas, more or less (perhaps less) related to graphics:

Determinants are incredibly useful, and have many magical properties that people often overlook. Geometrically, the determinant is a measure of the 'size' of a matrix. If you're given an arbitrary linear transformation, you can get a good idea of how it will scale a uniform set of vertices just by looking at the magnitude of the determinant. In particular, rotations and translations all have determinant equal to one, because they preserve the size of objects. On a similar vein, if you are given a transformation that is composed of any number of rotations, reflections, translations and scalings, you can tell if objects will come out mirrored or not by checking the sign of the determinant. In numerical algebra, the rate of convergence of any iterative process will be strongly determined by the determinant of the iteration matrix.

The inverse of a matrix is necessarily calculated (often implicitly) when solving any linear system of equations. Indirectly, this is the same as matrix reduction. So whether you realise it or not, you are inverting a matrix whenever you solve a set of simultaneous equations, compute a least common multiple/greatest common divisor or even when you long-divide.

Bases are also quite subtle in their uses. I'm sure you've used coordinate systems other than the Cartesian one in the past. So next time you convert a vector to polar form, compute a yaw-pitch-roll rotation matrix, barycentric coordinates, spherical harmonics, Fourier/wavelet transform, you'll be converting from one basis to another. Knowing exactly which basis it is that you're using is often unimportant for practical purposes, so we tend not to think about it. But don't forget about those who once slaved away in the sewers of pure mathematics so you could get your work done [wink].

##### Share on other sites
I just wanted to make a small comment on the use of bases. You have to switch back and forth between "ellipsoid" space when implementing swept sphere collision detection ;).

##### Share on other sites
thank you guys, those were some very good responses. :)

1. 1
2. 2
3. 3
Rutin
24
4. 4
5. 5
khawk
14

• 11
• 11
• 23
• 10
• 9
• ### Forum Statistics

• Total Topics
633651
• Total Posts
3013132
×