1

$$\frac{x}2=y=\frac{z}{-2}$$

What is the length of the segment inside of the unit cube?

I guess I should find the intersections of the line and the $x=1,y=1,z=1$ planes but I think this line doesn't pass through the inside of the unit cube. Am I wrong?

Théophile
  • 24,627
St3114
  • 273
  • It passes through $(0,0,0)$, and hence the interior of the unit cube. – Théophile Aug 07 '15 at 23:49
  • @Théophile but when we consider this cube (0, 0, 0), (1, 0, 0), (1, 1, 0), (0, 1, 0), (0, 0, 1), (1, 0, 1), (1, 1, 1), and (0, 1, 1) doesnt the line pass under the cube? – St3114 Aug 07 '15 at 23:53
  • What is your definition of unit cube? Is it $[0,1]^3$ or another popular choice $[-1,1]^3$? – coffeemath Aug 07 '15 at 23:54
  • St3114 -- in your comment above it seems the cube is in four dimensions. Is that right? – coffeemath Aug 07 '15 at 23:56
  • @coffeemath it was wrong copy paste sorry. Actually I dont exacly know what unit cube coordinates are. should we say it is the intersections of the x=+-1 y=+-1 and z=+-1 planes ? – St3114 Aug 08 '15 at 00:00
  • I wrote my comment assuming that "unit cube" means $[-1,1]^3$, analogous to the unit sphere. – Théophile Aug 08 '15 at 00:04
  • 1
    St3114, you better clarify what you mean by the "unit cube," even if you don't know what was meant by the original questioner. Ambiguous questions are not desired here. Do you want $0\le x\le 1$ and so on, or do you mean $-1\le x\le 1$ and so on as Théophile suggests, or something else? Choose one and tell us! – Rory Daulton Aug 08 '15 at 00:16
  • @Théophile so (0,0,0) is the gravity of the centre of cube? and $x=\pm \frac{1}{2},y=\pm\frac{1}{2},z=\pm\frac{1}{2}$ planes creates this cube. when we intersect with the line we found $(\pm\frac{1}{2},\pm\frac{1}{4},\mp\frac{1}{2}$) and ($\pm1,\pm \frac {1}{2},\mp1$) which point should we take? – St3114 Aug 08 '15 at 00:20

1 Answers1

2

It depends on the definition of "unit cube", but let's go with what you proposed in the comments, i.e., the cube bounded by the planes $x=\pm\frac12, y=\pm\frac12, z=\pm\frac12$.

A point lies on the surface of this cube if and only if the absolute value of its largest coördinate is $\frac12$. Therefore the line segment in question is from $(\frac12,\frac14,-\frac12)$ to $(-\frac12,-\frac14,\frac12)$. The point $(1,\frac12,-1)$, in contrast, is on the line, but outside the cube because it is on the wrong side of the planes $x=\frac12$ and $z=-\frac12$.

It can be helpful for problems like this to solve a similar problem in a lower dimension: try finding the length of the line segment in the unit square along the line $\frac x2=y$, for example. You can draw a diagram much more easily this way and see how it relates to the equations.

Théophile
  • 24,627