# Line Segment Passes through a Pair of Integers

**URL:** <https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287>\
**Category:** Factual Questions\
**Created:** [October 15, 2013, 4:39am UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287 "2013-10-15T04:39:26Z")\
**Posts on this page:** 17\
**Page:** 3

<div class="post-metadata">

**Author:** ![Learjeff](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Learjeff](https://boards.straightdope.com/u/Learjeff)\
**Post date:** [October 16, 2013, 10:50pm UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/41 "2013-10-16T22:50:34Z")

</div>

> [@Chronos](#):
>
> All numbers expressible as floating point numbers are rational, and hence one can in principle determine absolutely, yes or no, whether the line passes through a lattice point (though it might take longer to do it if your numbers are expressed to high precision). Alternately, if you meant a number that can’t be expressed exactly as a floating point number, but only approximated as one, well, then we’ve got a loss of information, with no way of recovering it, so of course we can’t be certain of getting the right answer.

Absolutely right; good point. My concern was the latter case. For example, if the line was one that included 1/3 as a slope or endopint, and if the line defined that way included the integral point, it wouldn’t appear when using strict equals, with floating point.

That’s a general issue with floating point. Whenever you compare floating point numbers for equality, you’re likely to be introducing a bug. Two floating point values are rarely equal when calculated differently, even though they would be if calculated with infinite precision.

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [October 17, 2013, 6:01pm UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/42 "2013-10-17T18:01:30Z")

</div>

Not all curves are created equal. Finding the root of a straight line vs. finding the root of a 5th degree polynomial are entirely different beasts. A straight line, being one dimensional, has certain nice properties when it comes to solving problems that non-straight lines don’t.

It’s like that cruft about how you can take an orange, slice it up and make an orange twice as big as the original. That’s not how most people think in terms of space. So let’s leave that kind of weirdness out unless needed.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 17, 2013, 7:47pm UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/43 "2013-10-17T19:47:34Z")

</div>

OK, **ftg** , what’s your definition of “one dimensional”? So far the best you’ve given is “a thing is one-dimensional if it’s really one-dimensional”, which, while true, is not particularly useful.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [October 18, 2013, 2:58am UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/44 "2013-10-18T02:58:15Z")

</div>

In ordinary mathematical parlance, a curve is a topological space which is locally homeomorphic to a line, which we’ll take to be **R** without loss of generality. The dimension of **R** is one, and like any other topological property, it’s preserved by homeomorphisms. Therefore the definition of anything that we would ordinarily call a curve is, in fact, one.

If you have some other notion of a curve this can fail, but then you have to define what you mean by it and explain why it’s a useful definition.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 19, 2013, 2:46am UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/45 "2013-10-19T02:46:11Z")

</div>

I think **ftg** is using a more-or-less standard definition of “curve” (e.g., his example is a hyperbola, not something like the Snowflake Curve), but a nonstandard definition of “dimension”.

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [October 19, 2013, 4:50am UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/46 "2013-10-19T04:50:29Z")

</div>

I’m guessing **ftg** ’s thinking is something like this:  
One dimension is a line. Two dimensions is a plane. Three dimensions is space.  
Since the points that make up a curve, like a hyperbola or parabola, are a subset of a plane but not of a line, that makes the curve two-dimensional.

The flaw in this thinking, from the standpoint of the standard mathematical definition of dimension, is that it confuses the dimension of the curve itself with the dimension of the space within which the curve is embedded.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 19, 2013, 6:39pm UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/47 "2013-10-19T18:39:27Z")

</div>

There are, of course, many different ways the word “dimension” gets used. It seems **ftg** is using a definition of dimension which is linear algebraic (e.g., “The dimension of a locus in an affine space is the minimum number of vectors whose span includes every difference between points on that locus”), while everyone else is using a topological definition (e.g., “A topological space is n-dimensional if it is locally homeomorphic to R^n”). Nothing wrong with different senses of the same word, which is all we need to acknowledge is going on here.

Keep in mind, this all started with **ftg** saying

> [@ftg](#):
>
> Note that a straight line is a one-d curve. A hyperbole is two-d. A lot of problems that are simple to solve for one-d get really hairy for two-d. So the difficulty between the two don’t always correspond.

which all seems reasonable enough on the appropriate interpretation of “-d”.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [October 21, 2013, 9:31am UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/48 "2013-10-21T09:31:37Z")

</div>

> [@Indistinguishable](#):
>
> There are, of course, many different ways the word “dimension” gets used. It seems **ftg** is using a definition of dimension which is linear algebraic (e.g., “The dimension of a locus in an affine space is the minimum number of vectors whose span includes every difference between points on that locus”), while everyone else is using a topological definition (e.g., “A topological space is n-dimensional if it is locally homeomorphic to R^n”). Nothing wrong with different senses of the same word, which is all we need to acknowledge is going on here.

What surprises me is that, as far as I know, **ftg** ’s is the the usual meaning of the term dimensional. Hence I’m surprised that so many don’t know it.

Think about the use of one-dimensional to refer to “flat characters.”\* A curve is not flat, but a line is.

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [October 21, 2013, 8:43pm UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/49 "2013-10-21T20:43:06Z")

</div>

To say that an obtuse Mathematical definition of “dimension” is the “usual” one is (sorry for being blunt) ridiculous. Point, line, plane, space. That’s what the usual definition really is.

As a Theoretical Computer Science person is my past life, I’ve worked with tuples and matrices and such a lot. So I understand the concept of one, two, etc., parameters being considered a dimension is some sense. But there are times when you say “dimension” and you mean an actual dimension. That should be the default understanding.

---

<div class="post-metadata">

**Author:** ![Learjeff](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Learjeff](https://boards.straightdope.com/u/Learjeff)\
**Post date:** [October 21, 2013, 9:06pm UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/50 "2013-10-21T21:06:32Z")

</div>

> [@ftg](#):
>
> To say that an obtuse Mathematical definition of “dimension” is the “usual” one is (sorry for being blunt) ridiculous. Point, line, plane, space. That’s what the usual definition really is.
> 
> As a Theoretical Computer Science person is my past life, I’ve worked with tuples and matrices and such a lot. So I understand the concept of one, two, etc., parameters being considered a dimension is some sense. But there are times when you say “dimension” and you mean an actual dimension. That should be the default understanding.

I understood what you said, but I wouldn’t say that Chronos’s definition is unusual or nonstandard or in any way obtuse.

Your examples of “point, line, space” apply to the arenas in which the objects appear. Chronos’s definition is the more usual one when discussing the objects themselves. For example, it’s typical to consider the surface of a sphere a 2D thing that is curved in a 3rd dimension. This definition is not limited to topology (where, for example, measurements like distance are ignored).

Your original point was valid. Chronos’s objection was a bit pedantic, though correct, and it didn’t refute your point. In any case, it’s just semantic quibbling and hopefully we’re done with it.

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [October 21, 2013, 9:31pm UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/51 "2013-10-21T21:31:54Z")

</div>

> [@ftg](#):
>
> an **obtuse** Mathematical definition

“abstruse”?

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 21, 2013, 10:04pm UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/52 "2013-10-21T22:04:51Z")

</div>

So, again, we have the circular definition that a “dimension” is a “real dimension”. A somewhat-obscure definition is surely better than no definition at all.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [October 22, 2013, 2:01am UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/53 "2013-10-22T02:01:16Z")

</div>

No, it’s a perfectly reasonable definition for certain applications: the dimension of a subset of a vector space is the dimension of its [affine hull](http://en.wikipedia.org/wiki/Affine_hull). It just doesn’t agree with the standard notions of dimension for nice spaces like a hyperbola, so you just have to specify that that’s what you’re talking about.

I think there’s a reasonable analogy to be made between these two notions of dimension and the notions of intrinsic and extrinsic [curvature](http://en.wikipedia.org/wiki/Curvature). In brief, intrinsic curvature is what you can pick up on from inside a space, and extrinsic curvature is what you have to be outside the space to see. A curve, in the usual sense, has no intrinsic curvature, but it does have extrinsic curvature. Likewise, a curve has intrinsic dimension one, but it can have an arbitrarily high extrinsic dimension.

(And just for the record, I’m an applied statistician. Anything that I know about is not obscure by any means.)

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [October 22, 2013, 2:53am UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/54 "2013-10-22T02:53:25Z")

</div>

> [@ultrafilter](#):
>
> No, it’s a perfectly reasonable definition for certain applications: the dimension of a subset of a vector space is the dimension of its [affine hull](http://en.wikipedia.org/wiki/Affine_hull). It just doesn’t agree with the standard notions of dimension for nice spaces like a hyperbola, so you just have to specify that that’s what you’re talking about.
> 
> I think there’s a reasonable analogy to be made between these two notions of dimension and the notions of intrinsic and extrinsic [curvature](http://en.wikipedia.org/wiki/Curvature). In brief, intrinsic curvature is what you can pick up on from inside a space, and extrinsic curvature is what you have to be outside the space to see. A curve, in the usual sense, has no intrinsic curvature, but it does have extrinsic curvature. Likewise, a curve has intrinsic dimension one, but it can have an arbitrarily high extrinsic dimension.
> 
> (And just for the record, I’m an applied statistician. Anything that I know about is not obscure by any means.)

It doesn’t have intrinsic obscurity, but it does have extrinsic obscurity. 🙂 (i.e. I wouldn’t expect someone with no background in mathematics to know what you’re talking about.)

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 22, 2013, 5:53am UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/55 "2013-10-22T05:53:14Z")

</div>

Another way to think about it: **Chronos** ’s use of “dimension” amounts (essentially) to “A locus L in an ambient space T is \<= n-dimensional if there is a continuous map from R^n to T whose range contains L”. **ftg** ’s use of “dimension” amounts to “A locus L in an ambient space T is \<= n-dimensional if there is an affine map from R^n to T whose range contains L”. The _only_ difference is whether the parametrization is taken to be continuous or taken to be affine.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 23, 2013, 3:18am UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/56 "2013-10-23T03:18:50Z")

</div>

I would say that there is a definition that agrees with **ftg** , but I wouldn’t say that he’s using that definition, since he’s not using any definition. OK, he’s saying that a point is zero, a line is one, a plane is two, and a space is three, but that doesn’t say what to consider something that isn’t a point, line, plane, or space.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 23, 2013, 5:04am UTC](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287/57 "2013-10-23T05:04:02Z")

</div>

But that’s not all he’s said. I think we can reasonably determine from context what **ftg** is doing, as he _does_ consider a curve which can be contained in a plane but not in a line to be 2-dimensional (that being what started this whole mess). He is clearly taking the dimension of an object to be the smallest dimension of an affine space containing it, even if he has not said those particular words.

[Previous page](https://boards.straightdope.com/t/line-segment-passes-through-a-pair-of-integers/671287.md?page=2)
