Hacker News new | past | comments | ask | show | jobs | submit login

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 :).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: