# Most pathetic question you will hear today

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

## Recommended Posts

Hey there gamedev.net!

I have recently been messing around with the XNA framework, and trying to learn that. But for as much as i am understanding, there is one big concept i just cannot grasp. This concept is matrices...

Most tutorials/guides i have looked up seem to describe very very in detail about this concept, while i understand that it is pretty complex... i just cannot pick up what i should be from said guides.

I was wondering if anyone of you skilled programming vets could possibly help me with this concept, in a way that an idiot like me could understand :x

Thanks in advance and sorry for taking up your time with this silly question

##### Share on other sites

In order to understand what a matrix is and why matrices are important in graphics and game development, you need to understand what a vector is. Do you understand what a vector is in mathematics? -- (a vector in mathematics not in the C++ standard library in which a 'vector' is a confusing name for a dynamic array) If not I would start there.

Edited by jwezorek

##### Share on other sites

Hi,

You need some books on XNA programming and implementation.  There are numerous ones out there.  Even one or two which are 1 to 3 years old would help a lot.  Some cover the drawing/ mesh area very well.  AmazonDOTcom is a good place to get XNA books, but there are others.

Everything you need to learn and implement XNA is already out there, so no - it is NOT dead - but mature. Mono is one of several ways to implement XNA cross-platform, so the ability to do so will be available for years - one reason why Microsoft does not directly support it anymore.

Edited by 3Ddreamer

##### Share on other sites

In order to understand what a matrix is and why matrices are important in graphics and game development, you need to understand what a vector is. Do you understand what a vector is in mathematics? -- (a vector in mathematics not in the C++ standard library in which a 'vector' is a confusing name for a dynamic array) If not I would start there.

Now if im understanding right (quite a few concepts im remembering here from physics and math) math vectors are these: v = (a, b, c) in which case yes i do have an understanding of them

Can I just quickly mention that microsoft will no longer support XNA, so it's sort of dead - http://www.gamasutra.com/view/feature/186001/reflections_on_xna.php

As to your real question, there are many resources to learn about matrices, or linear algebra in general.

I personally really enjoyed these three:

I did hear about XNA being discontinued, but i understand there is an open source version out there too, aside from all that im messing with it just so i can get better with programming as a whole

##### Share on other sites

Google "systems of linear equations".

##### Share on other sites

So true, IgnatusZuk, and I would add that some of the XNA books cover the math in an introductory way, too.

##### Share on other sites

an open source version out there too

Actually there is more than one XNA implementation out there.

##### Share on other sites
This is a thread about matrices, not about API choice.

CosmicDashie, I suggest a copy of Mathematics for 3d Game Programming and Computer Graphics. It's a bit expensive, but it's worth every cent because it explains everything about a ton of different topics from vectors to matrices all the way to the more advanced stuff, and how it all fits together. And it will be a great reference to have on your shelf.

##### Share on other sites

Now if im understanding right (quite a few concepts im remembering here from physics and math) math vectors are these: v = (a, b, c) in which case yes i do have an understanding of them

Right, basically, and what vectors are good for is representing a magnitude and a direction, say the position of something relative to the position of something else, or, say, the velocity of a spaceship.

Now, imagine someone came up to you and said, "I understand what regular numbers are but I don't understand what a fraction is" You could explain it to them by telling them what fractions are good for. You could say, "If you have x units of something and you want to evenly split it up among 3 people you can figure out how much each person gets by multiplying x by 1/3".

Well, similarly what matrices are good for is what they can do to vectors. Say you have a 2D shape represented as a set of coordinates in 2D space. If you wanted to rotate the shape around the origin by some angle you can think of each coordinate as a 2D vector and multiply each of these vectors by a particular matrix. This is the sort of thing that matrices are good for.

##### Share on other sites

Why don't you check out www.khanacademy.org section on linear algebra.

##### Share on other sites

Matrices represent linear transformations. While the concept of linear transformation in general may be hard to grasp, there are certain types of linear transformations that you will definitely be interested in: rotations, scalings, translations and projections.

It's relatively easy to start with 2x2 matrices acting on 2D vectors. You can represent scalings, rotations, flippings and shearing transformations with them (actually, that's basically all a linear transformation in 2D can do). Once you understand that, you can try to learn how 3x3 matrices represent interesting transformations in 3D. Then there is a "trick" of adding an extra variable so with a 4x4 matrix you can also represent translations. I put the word "trick" in quotes because there is a solid mathematical background that explains what you are doing, and it's not a trick at all (Projective Geometry), but it's probably not worth learning at this stage.

Try to learn things in the order I suggested. If you can't find material about something or if you get stuck trying to understand something, feel free to ask about it here.

You may also want to head to Khan Academy and see what they have on vectors and matrices. I don't really know if it's any good, but it's probably worth trying.

pretty much this.

although i don't have much to add to this conversation beyond what has been said, based on your avatar+name, i'm inclined to:

/)*

edit: also, i'd like to point out that this in no way is a "pathetic" question, and is perfectly valid to not have such knowledge when you first start working with 3D graphic's api's.

Edited by slicer4ever

##### Share on other sites

This is a thread about matrices, not about API choice.

API choice narrows the focus about matrices, so it is very relevant in my opinion.  Albert Einstein had the same philosophy of wanting to learn only that which he needed at the time or in the conceivable future, making him a mediocre student but high achieving physicist.  If one chooses, the same strategy can save the XNA user much learning of things not used with XNA.  Beginning and intermediate programmers are in heavy need of completing tasks through the workflow pipeline and not exploring the whole world of matrix theory which can lead to a PhD by itself.

I still stand by my recommendation to get a couple good books about XNA which include the math, particularly the matrices.

##### Share on other sites
Although I have some sympathy for 3Ddreamer's point of view in general, I think Linear Algebra is such a central subject to all of Math and Physics that I feel comfortable recommending a general understanding, and not some narrow understanding targeted towards getting a program written.

A coworker of mine told his daughter that he would pay for her to go to college on the condition that she take Linear Algebra and Statistics. Yes, they are that important.

##### Share on other sites

A general understanding of Math and Physics will come in due time.

##### Share on other sites

Now if im understanding right (quite a few concepts im remembering here from physics and math) math vectors are these: v = (a, b, c) in which case yes i do have an understanding of them

Maybe you should start with 2D, ....but if you want matrices and 3D then you`ll find plenty of good tutorials in no time.

##### Share on other sites

This is a thread about matrices, not about API choice.

CosmicDashie, I suggest a copy of Mathematics for 3d Game Programming and Computer Graphics. It's a bit expensive, but it's worth every cent because it explains everything about a ton of different topics from vectors to matrices all the way to the more advanced stuff, and how it all fits together. And it will be a great reference to have on your shelf.

the book you mention here, is this the one? http://www.amazon.com/Mathematics-Programming-Computer-Graphics-Edition/dp/1435458869/ref=dp_ob_title_bk

Glad i posted about this here though, lots of helpful websites, thanks everyone! gonna be something i really need to learn now

also  slicer4ever...

(\

##### Share on other sites

Wolfire also has a decent intro series on their blog, if you are looking to a soft intro to matrices/vectors/etc.

##### Share on other sites

This is a thread about matrices, not about API choice.

CosmicDashie, I suggest a copy of Mathematics for 3d Game Programming and Computer Graphics. It's a bit expensive, but it's worth every cent because it explains everything about a ton of different topics from vectors to matrices all the way to the more advanced stuff, and how it all fits together. And it will be a great reference to have on your shelf.

the book you mention here, is this the one? http://www.amazon.com/Mathematics-Programming-Computer-Graphics-Edition/dp/1435458869/ref=dp_ob_title_bk

Glad i posted about this here though, lots of helpful websites, thanks everyone! gonna be something i really need to learn now

also  slicer4ever...
(\

Yes, that would be the book. And 39$new? NEW!? My older edition cost me close to 100$. I take back what I said about it being expensive. That's cheap as hell.

##### Share on other sites

You could try this linear algebra lecture series by Gilbert Strang, which I've watched numerous times. It's not specific to game development, though it does discuss computational aspects. It starts out reasonably gently and follows a logical path to more advanced topics, and has the advantage that Prof. Strang talks like a mathematical Jimmy Stewart. :)

##### Share on other sites

You could try this linear algebra lecture series by Gilbert Strang, which I've watched numerous times. It's not specific to game development, though it does discuss computational aspects. It starts out reasonably gently and follows a logical path to more advanced topics, and has the advantage that Prof. Strang talks like a mathematical Jimmy Stewart.

Oh, man, I think I had him for that class ... but he looked a lot younger. Now I feel old.

##### Share on other sites

Oh, man, I think I had him for that class ... but he looked a lot younger. Now I feel old.

And those videos are from 8 years ago!

##### Share on other sites

Ha ha! I think he's hilarious. I love it when he points at a matrix and says things like "now I, er... will I, ah, will I invert this now?" - he's so George Bailey it's unreal!