Hacker News new | ask | show | jobs
by throwawaymath 2687 days ago
Wow, that vector space question is a great example. It’s the kind of thing that should be straightforward for anyone who has taken a linear algebra course, but I can also totally see students getting it wrong. This is especially the case because it’s actually very easy fundamentally (the set of all integers does not comprise a field, and so a vector space cannot be defined over it).

But to my recollection, most of the popular linear algebra textbooks[1] don’t spend time showing why the integers cannot form a vector space because it’s “easy.” Instead they spend time tediously walking through examples of bizarre sets defined over R and C to show which axioms are fulfilled and which are not.

In a similar vein to the way students might overthink the elementary probability question, I could see university students trained to disprove each of A), B), C) and D) - perhaps making a mistake along the way - instead of quickly scanning the options and picking out the one which simply isn’t defined over a field.

__________________________

1. I’m thinking of Friedberg et al, Hoffman & Kunze, Axler, Strang, etc.

3 comments

I got thrown and I know a lot of math. I got thrown because the field the vector space is over is not what I focus on when thinking about the structure of the vector space. indeed it took me a second to even come up with a reason why the ground set has to be a field at all - so that you can undo scalings - and while it's a good reason it still feels trivial.

edit: in fact i learned linear algebra from hoffman kunze

You can generalize vector spaces to work over arbitrary rings (in which case it is a module). I did have to do a double take on that question, because in my mind when I see someone talking about a vector space over a ring, I just silently translate it to a module (because 90% of the time, the person just misspoke, 9% of the time, even if they meant vectorspace, the immediate follow up would be "no, but does your point still stand of we consider it a module?", and maybe 1% of the time they are actually being adversarial.
As I remember, most first courses in linear algebra don't deal with the subject as anything like abstract algebra and aren't going to be targeting students who can distinguish a ring from a field. Essentially, until you can past the calculus sequence, most math in the US is centered on calculation with only a few forays into proofs and definitions.
As a bumbling idiot who never did university level math, I don’t understand the question or the answer. (I did understand the probability one and knew the right answer to that at least.) I’m trying to catch up. Would you be kind enough to explain it?
Sure.

Operations in applied linear algebra - such as matrix multiplication and solving systems of linear equations - are formalized by the theory of vector spaces, much like calculus is formalized through the theory of analysis. Vector spaces are algebraic structures which axiomatize the linearity you need to carry out these operations. If you can establish your equations exist in a vector space, you can prove that they admit linear relations and are thus solvable as linear systems.

More precisely, a vector space V is any set S defined over a field F which is closed under both vector addition and scalar multiplication, where the elements of S are called vectors and the elements of the underlying field F are called scalars. The term "closed" means that for every pair of vectors x, y in V there exists a vector x + y in V, and for every scalar c in F and vector x in V there exists a vector cx in V. There are eight axioms in total, for things like associativity and commutativity, but those aren't germane to this particular example. What's important is that vector spaces are what allow you to form linear combinations of things, which is the scaffolding you need to prove things like linear dependence and independence; whether or not a system of linear equations has no solutions, one solution or infinitely many solutions, etc.

Fields are the algebraic structures which formalize the elementary arithmetic you're already familiar with over sets like the the complex numbers, the real numbers, the rationals, etc. They are sets which are closed under "regular" addition and multiplication. Notably, integers do not comprise a field because integers do not have multiplicative inverses. Multiplicative inverses are the axiomatic way of establishing that in any field, division must be possible. So concretely, there is no multiplicative inverse 1/n for any integer n. There is in the set of rationals, but not the set of integers. Therefore integers are not closed under multiplication, and they cannot comprise a field.

Since the integers do not comprise a field, you cannot define a vector space over the integers, because the scalars used to define scalar multiplication in vector spaces are just elements of the underlying field. If you try to define a vector space over a set without multiplicative closure, the vector space cannot be closed under scalar multiplication. Among other things, linear combinations stop being invertible (or even possible in general), and linear relations don't exist.

So circling back to the specific question: it's asking which of the given sets comprises a vector space. You can make all kinds of abstract vector spaces (e.g. the set of all polynomials over a field, the set of all polynomials with degree at most n over a field, the set of all continuous functions, etc). But if you stick with the definition of a vector space, you don't need to tediously test each of the given sets for the eight axioms. You just have to remember the integers don't comprise a field, so the set of all triples of integers can't be a vector space either.

Hopefully that's clear, let me know if you'd like me to clarify anything.

The integers are totally closed under multiplication. They lack an inverse under multiplication that's why they aren't a field.
Your heavy emphasis on the idea that fields are closed under addition and multiplication is very counterproductive here, because the integers are closed under addition and multiplication.

The integers violate the field axiom that every element in the field (other than 0, the additive identity) must have a multiplicative inverse in the field. But that has nothing to do with the requirement of being closed under multiplication.

> If you try to define a vector space over a set without multiplicative closure, the vector space cannot be closed under scalar multiplication. Among other things, linear combinations stop being invertible (or even possible in general), and linear relations don't exist.

Mind clarifying this part? As someone else already pointed out, the integers are multiplicatively closed, but I suspect you're using "multiplicatively closed" to also mean "closed under multiplicative inverses". But I don't see how linear combinations stop being possible, e.g., "3x + 2y" is still a linear combination in a Z-module, or what it means for a linear combination to be invertible.

(Also not sure what exactly you mean by linear relations not existing if you have a module and not a vector space...)

Thank you, that was really helpful!
you need closure on scalar mult. if (2,3,4) is a valid int triple & 1/3 is your scalar then (2/3,1,4/3) throws you out of the group so there goes your closure. unlike op, you don’t really need to know about fields to solve this.
If the triple is defined over the integers, why would you allow 1/3 as a scalar in the first place.

By this logic, should R not be a vector space, as it is not closed under scalar multiplication by i, or Q not be a vector space, as it is not closed under scalar multiplication by sqrt(2)?

Something being sidestepped in the post you responded to is that what is being talked about is a valid algebraic object with lots of structure to it. It’s called a module which you can think of as a sort of vector space. It’s just that the scalars may not have the property that they have multiplicative inverses. (I’m deliberately focusing on rings that are integral domains for the nitpickers.). When talking about these objects you have to include the underlying scalar set.

For instance the real numbers are a vector space over the rationals. They are a different vector space over the reals. They are not a vector space over the complex numbers and are not a vector space over the integers. But they are a module over the integers. But not a module over the complex numbers.

Everything you've said is true, but circling back to the example given, we still can't choose a scalar 1/n for integral n. Yes the integers are a ring, and yes you can define a module over a ring which generalizes a vector space.

But the point being spoken to here is that the explanation is backwards: you can't choose 1/n from Z. Therefore you can't use it as a scalar, so you'd never even break closure in the vector space. The hypothesis doesn't work before you can engage that contradiction.

You are correct and I wasn't trying to criticize what you wrote. gizmo686's post (the one I responded to) indicated a sense of insight into these issues. I wanted gizmo686 to feel justified in his/her thoughts. Namely, that what we call modules are natural objects and they look at feel like vectors spaces on the surface.
> why would you allow 1/3 as a scalar in the first place.

Because it's a definitional thing. A "scalar" is routinely defined as a real number, not an integer.

And you're absolutely right that it makes no sense, which is the whole point of the multiple-choice question. Four of those answers are plausible, the other requires you to make assumptions (like a redefinition of scalar) not in the question as posed.

Consider the possibility that it does make sense but that you aren’t aware of why it makes sense. A vector space has much more structure than a module and the distinction is not unimportant. Also, scalars are not defined as a real number. Scalars are elements of the base field. When talking about a vector space one must always specify the base field. This is important and is the point of the problem in question. For instance the real numbers are a vector space over the real numbers and that vector space structure is different than the vector space structure of the real numbers as a vector space over the rational numbers.
Huh? A scalar is very specifically a field element by definition. This is why it's important to specify the field you're working with when you talk about a vector space - a scalar is not going to be a real or a complex if your field isn't R or C.

If you've seen someone define a scalar as a real number, that's really only because they're informally stating their underlying field is R.

I keep seeing you people in this thread and wondering, with all respect, what planet you're coming from.

The whole purpose of this exercise is to see if there was a way to come up with a straightforward, reasonably informal, multiple choice question that would expose a fundamental understanding in basic university math concepts like "vector space" in the same way we see in primary math.

And instead all you people want to do is natter over the ways in which someone could cleverly make the "wrong" answer right. It's... beyond missing the point, it's actively working against the whole goal of the exercise.

Except that we have vector spaces with scalars that are not the reals all the time. For instance, consider this excerpt from the article:

"Or perhaps they wouldn’t like A because the scalar field [the complex numbers] is the same as the set of vectors (unless, that is, they thought that the obvious scalars were the real numbers)."

In this case, while there is an an acknowledgement that you could take the reals as your scalars, it is regarded as the secondary of the "natural" choices.

Or, in my example, example, there is no way to view Q as a vector space over R, but it is clearly a vector space. There is an entire field of algebra (field theory), that relies on the fact that, for example, Q(sqrt(2)) is a 2 dimensional vectorspace over Q.

> Because it's a definitional thing. A "scalar" is routinely defined as a real number, not an integer.

Well, this is totally untrue. A scalar is defined as a non-vector quantity, a single element as opposed to a multidimensional list of them.

Not to undergraduates in early mathematics courses it's not. This is a term introduced in grade school, for goodness sake.

I give up on this thread. It's a bunch of people not just willfully misunderstanding the linked article, but actively campaigning against the whole idea of math education in an attempt to prove how much smarter than each other they are. This is... awful, folks.

While that's the right idea, I'd push back against not needing to know about fields since the scalars are just field elements. If you try to define a vector space over the integers, it's more accurate to say you can't choose 1/n as a scalar, because 1/n doesn't exist in your underlying field. Your closure ends before you even get to choose the element.

For students it might not be immediately obvious why that's a problem for vector spaces, but yes it does mean scalar multiplication won't be closed in the vector space. And more practically speaking, if you tried to solve a system of equations without invertible linear combinations, you'd have no linearity whatsoever. Elementary row operations likewise cease to be invertible, so matrix reduction isn't possible...the whole thing breaks down really.

> I'd push back against not needing to know about fields since the scalars are just field elements.

The point was that you don't need to know the jargon of "field" and the full set of implications. It's enough to know that multiplying integers by non-integer scalars can give non-integers, which means that "scalar multiplication" can produce a thing that is not a "triple of integers". So it's not a well defined vector space operation.

No need for "field" or "closure" or any other jargon not in the question as posed.

I suppose. All I'm getting at is that since Z doesn't contain 1/n for integral n, you wouldn't be able to use it as a scalar in the first place. So if you extrapolate from there, you have to choose a different route to show that defining the vector space doesn't work because you can't trigger the contradiction that fails scalar multiplicative closure.
> It's enough to know that multiplying integers by non-integer scalars can give non-integers

Not quite: you also need to know that multiplying by integer scalars instead isn't an option.

The question as posed asked as to use the "obvious" choice of scalar multiplication, and to a student who hasn't yet taken the "field" part on board, it might seem obvious to achieve closure by using the integers for scalars.

This isn’t quite right. When I personally learnt these things in an undergrad program in math in the US, we learnt monoids. Then we learnt semigroups. Then groups. Then abelian groups. Then vector spaces. Then on the midterm we got questions exactly like the one we are debating here - is this guy a vector space, is that guy a semigroup, is that guy abelian etc. At that point, none of us knew what a ring was, what a field was etc. In the US you learn things like cosets and Lagrange’s theorem way before you even get to fields. That’s why I said you don’t need fields.

If you have (2,3,4) and want to navigate to (5,6,7) who is also in your space and you have scalar mult as your tool of choice then mult with 2 gets you to (4,6,8) but then you are stuck. Soon you realize no matter what you do you can’t navigate that space without fractions.

A working definition of a space might be - you have a member in that space, you can get to every other member by just scalar mult. Addition is just freebie because you can rephrase it as bunch of scalar mults.

You are doing this the wrong way around, as your scalars are in Z and so you can't just "pick" 1/n, any more than you can pick pi.

In fact, closure under scalar multiplication is there. Pick d in Z and d(a,b,c) = (da,db,dc) is fine.

The real problem is, I need an inverse. So if that exists, we have : e(da,db,dc) = (a,b,c) and e must exist in the set for (a,b,c) != (0,0,0).

Now you are trying to find e that behaves like 1/d , but you've left the set - no good.

But if you don't know about fields, you could use the integers instead of the reals for your scalars, and imagine you've made a perfectly good closed vector space that way.
A vector space is a set of elements that are closed under addition and scalar multiplication (multiplying by a real or complex number).

The precise definition of what we mean by that is covered by the vector space axioms.

http://mathworld.wolfram.com/VectorSpace.html

  '
A. The set of all complex numbers.

You can add two complex numbers, and multiply them by a real (or a complex number in this case) and still have a complex number.

So it's a vector space.

  '
B. The set of all functions from (0,1) to \mathbb R that are twice differentiable.

Two twice differentiable functions can be added together to yield a twice differentiable function

  (f(x)+g(x))''=f''(x)+g''(x)
and scaled by a scalar

  (cf(x))''=c(f''(x))

  '
C. The set of all polynomials in x with real coefficients that have x^2+x+1 as a factor.

Given two polynomials P,Q, which have x^2+x+1 as a factor they can be expressed as

  P(x) = f(x)(x^2+x+1)
  Q(x) = g(x)(x^2+x+1)
So

  P(x)+Q(x) = (f(x)+g(x))(x^2+x+1)
And of course

  c*P(x) = cf(x)(x^2+x+1)
Which is also a polynomial with real coefficients.

  '
D. The set of all triples (a,b,c) of integers.

Almost works, except multiplying by a scalar would yield a tuple of real numbers. Kinda silly. In programming, if you attempted to write a function

  function List<Int> multiply(List<Int> list, Real c) {
    return list.map((x) => x * c);
  }
You'd get a compiler exception since the return type wouldn't match (or you'd get some warning about shortening the precision).

  '
E. The set of all sequences (x_1,\dots,x_n)\in\mathbb R^n such that x_1+\dots+x_n=0 and x_1+2x_2+\dots+nx_n=0.

Adding two sequences

  (x_1,...x_n) + (y_1...,y_n)
gets you

  (x_1+y_1...,x_n+y_n)
which plugging into the above two equations, and rearranging, will show that you'd get

  (x1+y1) + (x2+y2)... + (xn+yn) = (x1+x2+..xn) + (y1+...+yn) = (0) + (0)
and the same for the second equation.

Also, scalar scaling works fine.

  '
So only D has any issues.

The short explanation as to why we insist on scalars being real or complex is that a major goal of linear algebra is to provide ways of solving equations. And you really want to perform division to solve equations, which real and complex numbers let you do. Integers aren't closed over division, so they aren't good for solving linear equations.

For example, if your vector space is integer triplets then

  2 * x = (1,0,0)
Wouldn't have any solutions in the set of integer triplets. This is a linear equation, and the goal of linear algebra is to provide solutions, so it's better to have the framework yield the answer of x = (.5,0,0) and then say "Oh, the answer lies outside of the original set, so it wasn't a vector space to start with." Well, that's kinda the extrinsic view of it, the intrinsic view would throw an exception :).
The math education I experienced focused heavily on "how". "How" such and such operation arrive to its conclusion and "how" such and such operation fulfil some "rules". Seldom does it touch on "why". Why certain notion, like linear algebra, heck, maybe even negative number, exists in first place. Procedures like negative times negative gives positive number. Yeah sure, but why? What does that mean really. I think the "why" of everything is what makes one understand anything
I'm a high school math and science teacher, and I completely agree this is a problem. Several of my students struggled greatly with simple arithmetic until I set down and gave them reasons for why a negative times a negative was a positive (which meant I also had to explain to them why multiplication works like it does).

I personally think part of the problem is how elementary education is structured. At least in my state, elementary school teachers are expected to be extreme generalists, and only have to take a math class or two -- and then nothing above simple college algebra (which is fine). But they always complain about how difficult it is, and they don't understand math, often taking the state's required exam multiple times because they can't pass math. Yet these are the people we allow to teach kids math; it's a huge issue when they're being taught math by people who don't understand why it works, only the algorithms they've memorized.

Coincidentally, this is also why the 'new math' was so lambasted -- these teachers (and often, parents) don't understand how numbers work, thus they think it's useless to teach kids to subtract 20 and add 2 instead of subtracting 18. Despite the fact that one is much easier to do mentally, and allows you to get a good sense of how subtraction and addition interact.

I'm not a fan of charter schools, but if I had money, I'd start an elementary charter school where the subjects were taught by people who understood that and not generalists. And students would get like multiple hours of recess a day, especially those first few years. Just pure, unstructured play time. But that's a rant for another day.

Hi dorchadas, I really like your comment!

I'm looking for great high-school Math teachers for a project. If you wouldn't mind sparing a few moments, please get in touch with me via email (gmail with my username) so I can give you some more details.