The philosophy behind the mathematics of quantum mechanics My field of study is computer science, and I recently had some readings on quantum physics and computation.
This is surely a basic question for the physics researcher, but the answer helps me a lot to get a better understanding of the formulas, rather than regarding them "as is."

Whenever I read an introductory text on quantum mechanics, it says that the states are demonstrated by vectors, and the operators are Hermitian matrices. It then describes the algebra of vector and matrix spaces, and proceeds.
I don't have any problem with the mathematics of quantum mechanics, but I don't understand the philosophy behind this math. To be more clear, I have the following questions (and the like) in my mind (all related to quantum mechanics):


*

*Why vector/Hilbert spaces?

*Why Hermitian matrices?

*Why tensor products?

*Why complex numbers?


(and a different question):


*

*When we talk of an n-dimensional space, what is "n" in the nature? For instance, when measuring the spin of an electron, n is 2. Why 2 and not 3? What does it mean?


Is the answer just "because the nature behaves this way," or there's a more profound explanation?
 A: Scott Aaronson, himself a (quantum) computer scientist, thinks and writes about a number of these subjects in his paper Is Quantum Mechanics An Island In Theoryspace? - at least the "why complex numbers and not the reals or the quaternions?", and I'm pretty sure he mentions it in his 'Democritus' lectures as well.
A: Vector spaces because we need superposition. Tensor product because this is how one combines smaller systems to obtain a bigger system when the systems are represented by vector space. Hermitation operator because this allows for the possibility of having discrete-valued observables. Hilbert space because we need scalar products to get probability amplitudes. Complex numbers because we need interference (look up double slit experiment).
The dimension of the vector space corresponds to the size of the phase space, so to speak. Spin of an electron can be either up or down and these are all the possibilities there are, therefore the dimension is 2. If you have $k$ electrons then each of them can be up or down and consequently the phase space is $2^k$-dimensional (this relates to the fact that the space of the total system is obtained as a tensor product of the subsystems). If one is instead dealing with particle with position that can be any $x \in \mathbb R^3$ then the vector space must be infinite-dimensional to encode all the independent possibilities.

Edit concerning Hermitation operators and eigenvalues.
This is actually where the term quantum comes from: classically all observables are commutative functions on the phase space, so there is no way to get purely discrete energy levels (i.e. with gaps in-between the neighboring values) that are required to produce e.g. atomic absorption/emission lines. To get this kind of behavior, some kind of generalization of observable is required and it turns out that representing the energy levels of a system with a spectrum of an operator is the right way to do it. This also falls in neatly with rest of the story, e.g. the Heisenberg's uncertainty principle more or less forces one to have non-commutative observables and for this again operator algebra is required. This procedure of replacing commutative algebra of classical continuous functions with the non-commutative algebra of quantum operators is called quantization. [Note that even on quantum level operators can still have continuous spectrum, which is e.g. required for an operator representing position. So the word "quantum" doesn't really imply that everything is discrete. It just refers the fact that the quantum theory is able to incorportate this possibility.]
A: 
Is the answer just "because the nature behaves this way," or there's a more profound explanation

I would say , yes to "because nature behaves this way". It is the most economical description of experimental data using mathematics, to date. 
A: First of all, the philosophy of quantum mechanics is hardly straightforward to most physicists. This has spawned an entire industry of "quantum interpretations" to the "quantum measurement problem".
Quantum mechanics is probably one of the best solutions to the problem of making mysticism mathematically precise. Quantum mechanics puts mysticism on a firm mathematically footing. Quantum mechanics is about Cosmic Consciousness and Reality.
Really, you can read about it straight from the horse's mouth in the book Quantum Questions, which is a compilation of mystical writings by the founders of quantum mechanics themselves. People like Werner Heisenberg, Erwin Schroedinger, Albert Einstein, Louis de Broglie, Jeans, Max Planck, Wolfgang Pauli and Arthur Eddington. They're not mere "fringe" physicists, even though "fringe" physicists like Jack Sarfatti, David Bohm, Amit Goswami, John Hagelin and Frank Tipler often do have a point...
Another book you can read is Quantum Enigma.
A: It is strange that you are not very comfortable with Hilbert spaces because actually continuous functions form Hilbert space and physics is all about functions. The general difference with classical mechanics is in the fact that classical mechanics was formulated long before people who used and learned (and even developed) it could understand manifolds and Lie algebras while for the time of quantum mechanics the idea of Hilbert space and all that stuff became more or less natural. 
The same with the rest. You could formulate QM without complex numbers (in principle), but this would be the same as formulation of Maxwell's equations without vectors. People say that Maxwell's equations actually were formulated before physicist were familiar enough with the vectors and it was a nightmare.
A: I asked the same questions some time back. 
Read :-)


*

*Heisenberg's entryway to matrix mechanics

*Understanding Heisenberg's 'Magical' Paper of July 1925: a New Look at the Calculational Details
A: Quantum mechanics is a real time solution of Newton's equation. If you solve Newton's equation in real numbers you get Newton's solution. If you solve Newton's equation in complex numbers you get quantum solution and the difference between the two solutions is relativistic. Google into Roger Anderton's time dependent Newton's equation and see that the difference between Newton's mechanics in that Newton used real numbers and when Newton's equation is solved in complex numbers it gives quantum mechanics and the difference between quantum mechanics and newton's mechanics is relativistic mechanics or quantum = newton + relativiity. It is quite ineteresting article written by an english engineer 
