## 3d vectors

Post any maths and/or physics related questions here.

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

### 3d vectors

I have read a little about 3d vectors & i was wondering whether anyone can verify that this is correct:

I have 3 points on a graph - (0,0,0), (0,0,4), (4,0,0). Would it be true to state that the straight line going from (0,0,4) to (4,0,0) equals 32^.5?

This is how I did it: first I found the distances between (0,0,0) & (4,0,0) on the x-axis = 4 units, & between (0,0,0) & (0,0,4) on the z axis = 4 units. After that, I used Pythagoras's theorem to find the straight line from (0,0,4) to (4,0,0), which involves the z & x axis.

Here is the calculation for that:
Code: Select all
`a^2 + b^2 = c^2 /* a = dist (0,0,0)to(4,0,0); b = dist (0,0,0)to(0,0,4); c = dist (0,0,4)to(4,0,0)*/4^2 + 4^2 = c^2c = 32^.5 `
joyrider

Posts: 92
Joined: Mon Jul 12, 2004 2:39 am
Location: Melbourne, Oz (Australia)

I don't see anything wrong , it's totally right .

Blueteeth

Posts: 616
Joined: Thu Sep 25, 2003 9:54 pm
Location: Egypt

I believe the distance formula for 3 dimensions is as follows:

That leaves us with
" sqrt( (4)^2 + (0)^2 + (-4)^2 )"

Which simplifies to

" sqrt( 32 ) "

So I belive that you are correct.
Kybo Ren
C++ Beginner

Posts: 2049
Joined: Wed Feb 11, 2004 9:28 pm

Kybo_Ren wrote:I believe the distance formula for 3 dimensions is as follows:

You would be correct. The distance formula carries into the 3rd dimension. Way to think this one through though joyrider
"Given enough time, man can do anything with a bit of string and some Tinker toys." Bruce Bolden, Senior Instructor at the University of Idaho.

leas5040

Posts: 1214
Joined: Mon Apr 12, 2004 9:51 pm
Location: Moscow, ID