View unanswered posts | View active topics It is currently Thu Sep 18, 2014 3:37 am



Reply to topic  [ 4 posts ] 
 rows vs columns 
Author Message

Joined: Mon Jul 30, 2007 5:24 am
Posts: 4
Post rows vs columns
http://www.gamemath.com/chapter7.pdf
At the link above at the page no 93 there is an equation 7.9 .Mathematically it's correct but the author says :
"If we interpret the rows of a matrix as the basis vectors of a coordinate space, then
multiplication by the matrix performs a coordinate space transformation. If aM=b,
we say that M transformed a to b.
" . I'd rather say "If we interpret the columns of a matrix as the basis vectors of a coordinate space" . Why ? To get the coordinate of a vector V in a coordinate space described by the versors (i,j,k)
must be made the scalar product (V*i,V*j,V*j) .If the components of the vector V are in row like V=(x,y,z) then the components of the three versors must be organized columns because the rule of multiplication is row*column .Am I missing something ?
Thank you !!!! :?:


Tue Feb 08, 2011 4:30 pm
Profile
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 291
Post Re: rows vs columns
I think you are being too analytical. Rows and columns gets swapped all the time, point is that the concept here is solid. If you think of the columns or rows as a basis and you think of the other matrix as a set of vectors as columns or rows and you multiply you transform. You just need to watch your conventions of what's what. That's all. There is no RIGHT way, just as long as it works.

Andre'


Tue Feb 08, 2011 7:34 pm
Profile WWW

Joined: Mon Jul 30, 2007 5:24 am
Posts: 4
Post Re: rows vs columns
Hmmm...I try to develop a pattern how a matrix of affine transformation is built it because I always forget how to relate two frames ,it's what in math is known as changing the basis right?
Lots of books try to present the subject in a intuitive manner but for me it's easier if I take a math approach.
Let's consider the frames at the link :
http://anorganik.uni-tuebingen.de/klaus ... r/rotation
As I said in my previous post To get the coordinate of a vector V in a coordinate space described by the versors (i,j,k)
must be made the scalar product (V*i,V*j,V*j)
.This is the pattern or rule which help me to build the transformation matrix .
LEt's see how the things going:
We may say that the coordinates of point P in the frame(X',Y') are (x',y') and (x,y) in the frame(X,Y) respectively .
The tranformation is (X',Y') - > (X,Y) so I want to get the matrix M which relates the 2 pairs of coordinates
(x',y') *M= (x,y);
Accordingly to what I said x=OP*i (*-scalar product) where coordinates of i in the frame (X',Y') are i(cos @ ,-sin @)
The same goes for y: y=OP*j where j(sin@,cos@) where i and j are the versors of axis X respectively Y.
So x = OP*i => x = x'cos@-y'sin@ and y = x'*sin@+y'*cos@ . To have this eq's in a matrix form the versors i and j must be arranged as columns so:

(x',y')| cos @ sin@ | = (x,y) that's the relation everyone know it .
|-sin @ cos@|

My source of confusion was the fact most books present the relation like this:
(x,y) | cos @ sin@ | = (x',y')
|-sin @ cos@|

but with the axis like in figure from the link above .
So in my mind I switched the coordinates(frame of reference) also and everything blew up


Thu Feb 10, 2011 6:54 am
Profile
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 291
Post Re: rows vs columns
It's very common for some teachers and books for example to like to multiple column vectors against transform matrices, and others (like me), like to write things as row vectors and then mutliply. I think the confusion is mathematicians prefer column vectors and thinking in terms of rows and columns. Where computer programmers think in terms of row vectors and columns and rows, like x,y on a screen. So, when math guys do computer graphics they use math conventions, when programmers do graphics they use the opposite conventions. HOWEVER, no matter what, it always works out, that's the beauty of math.

So, pick a way, use it, and if a book does it differnetly then you just have to transpose in your head.

Andre'


Thu Feb 10, 2011 10:31 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.