Quick maths question

Soldato
Joined
12 Apr 2004
Posts
11,788
Location
Somewhere
And no, this isn't homework ;)

Can two vectors of different numbers of dimension be added together? For example, can the 2-vector (2, 2) be added to the 3-vector (2, 2, 2) to give another 3-vector, (4, 4, 2) , or is this not a valid thing to do?

None of the sites I've looked on seem to address this.
 
eXSBass said:
As long as you get your place values correct, why not?
spirit said:
vector (2,2) is the same as (2,2,0) [if i remember right] so i don't see why not.
This is what I was thinking, but I wanted to be sure that it wasn't something that strictly speaking shouldn't or can't be done.
 
well i'm sure you can, i've done it loads of times when i was doing f.maths last year (but i don't think any alevels q's required it).

However, since i haven't done any maths of note for a year i wouldn't really trust myself (although i did teach the SAT & SAT subject tests lol - what a joke they are)
 
technicaly speaking, I dont think it should be done. eg, I know you shouldn't add matrices of different sizes together.

Things like dot products/cross products don't work with differing dimensions. '+' signs should only be used in 'their' space, so adding different dimensions makes no sense. It's perfectly allowable to map a R^2 vector to an R^3 vector, and then add away, though :)
 
Thats what I was thinking, you shouldnt really do it. But I guess if you have your reasons to do it, you can overload the + operator.
 
Back
Top Bottom