Measurable functions and unbounded operators in von Neumann algebras How do you define unbounded measurable functions for a general von Neumann algebra?
For the commutative algebra $L^\infty(X,\mu)$, we can consider the space of all measurable functions that are almost everywhere finite. This set has certain nice properties: it is closed under multiplication and there is the notion of convergence almost everywhere.
For the the noncommutative algebra of bounded operators on a Hilbert space, we can consider the set of all closed unbounded operators with dense domain. These operators are quite important in PDE, since differential operators are always unbounded. It is not obvious to me, however, why the product of two unbounded operators will be again a nice operator or how to generalize convergence almost everywhere to this setting.
Is there any construction like the above ones for an arbitrary von Neumann algebra? Can one get any standard properties of measurable functions from this construction?
If the closure of the spectrum of an unbounded operator $T$ is not the whole $\mathbb C$, and $z$ does not lie in this set, then we can consider instead of $T$ the resolvent $(z-T)^{-1}$, which will be a bounded operator. However, it is not clear to me how to proceed when the spectrum is the whole $\mathbb C$ or whether there is a more conceptual way to define these objects.
Update: I must have phrased the question inaccurately; the answer to the original question would be given by affiliated operators, a construction beautiful and useful, but not quite what I had in mind. I am sorry for the confusion caused (by the way, does anyone know how I can mark two answers as accepted, one for the original question and one for the rephrased one?) The rephrased question is:
For each von Neumann algebra, define canonically a set $S$ such that:
* For the algebra $L^\infty(X)$, $S$ is the set of all measurable functions on $X$.
* For the algebra of bounded operators on a Hilbert space, $S$ is the set of all unbounded operators on the same Hilbert space.
Alternatively, explain why it impossible (or unreasonable to try) to define such a set for all von Neumann algebras. So, I wish to somehow see the set of objects that will somehow remind of unbounded operators, not to study some specific unbounded operators on given spaces. These objects need not be actual operators in any sense for an arbitrary algebra.
 A: I think your question should be as follows:
Given a von Neumann algebra $M$, can we define a canonical set $S$ such that


*

*if $M=L^\infty(X)$ acting on $L^2(X)$, then $S$ is (isomorphic to) the set of a.e. defined measurable functions, and

*if $M=B(H)$ acting on $H$, then $S$ is the densely defined, closed unbounded operators?


If we take this slight alteration of the question, then I believe the answer is the closed affiliated operators. Here's a sketch of a proof which I think should work, but you should check the details just to make sure.
Let $A=L^\infty(X)$. If $f$ is an a.e. defined measurable function, define as in my other answer
$$
D(M_f)=\{ \xi\in L^2(X) | f\xi\in L^2(X)\}.
$$
Then $M_f\colon D(M_f)\to L^2(X)$ is closed and affiliated with $A$.
Now suppose $T$ is a closed, densely defined operator affiliated to $A$ acting in $L^2(X)$ (abbreviated $T\eta A$). Then we can do polar decomposition to get $T=U|T|$ where $U\in A$ and $|T|\eta A$. Hence we have reduced to the case where $T$ is positive and self adjoint. Since $T\eta A$, we must have that $f(T)\in A$ for all bounded Borel functions $f$. In particular, for $n\geq 1$, $T_n=\chi_{[0,n]}(T)\in A$, and $T_n$ increases to $T$. It should be clear how to proceed now to get that $T$ is multiplication by an a.e. defined measurable function.
A: I can't answer your more detailed questions, but does the construction of affiliated operators help at all? The wikipedia page seems to have a good range of pointers to the literature.
A: This question has at least 3 answers:
1) Given a von Neumann algebra M, take its canonical L^2-space L^2(M), which is a Hilbert space, take the corresponding canonical representation of M on L^2(M) via left multiplication and take
the set of all closed densely-defined unbounded operators affiliated with this representation.
This set is not a ring except when M is finite (see below).
2) Given a semifinite (i.e., only type I and type II components are allowed)
von Neumann algebra with a faithful semifinite normal trace τ,
we can construct a unital *-algebra of τ-measurable operators, which is the completion of M in the
τ-measurable topology.  There is a canonical injective map from the set of all τ-measurable operators
to the set of all affiliated operators in 1), which is not surjective unless M is finite
(only type I_n and II_1 components are allowed).
Thus in the finite case every affiliated operator is τ-measurable.
Note that in the commutative case the unital *-algebra of τ-measurable operators is a proper
subalgebra of the algebra of all unbounded functions, in particular the identity function on R is not τ-measurable
if τ is the Lebesgue measure on R.
3) If M is finite, we can also take the maximal noncommutative localization of M with respect to all elements whose
left and right support equals 1.  The resulting object is a unital *-algebra,
which coincides with the usual algebra of unbounded functions in the commutative (type I_1) case
and with the algebra of affiliated (or τ-measurable) operators in the finite (type I_n and II_1) case.
See my question on this topic for more information.
4) If you are only interested in L^p-spaces, then there is an extremely nice theory due to Haagerup et al.
I can comment further on this if you are interested.
To sum up, the best choice seems to be 2),
however, if you don't need any algebraic operations then 1) also works.
For L^p-spaces take 4).
With respect to one of your comments I also want to point out that M does act canonically
on a Hilbert space, namely L^2(M).  This construction is also functorial in the right category.
A: It is not always the case that the composite of two operators is nice. In general, the composite of $S$ and $T$ is defined by
$$
D(ST)=\{\xi\in D(T) | T\xi\in D(S)\}.
$$
There is no reason to expect this space to be dense.
I agree with @Yemon. You want the affiliated operators. Here's an interesting parallel for finite measure spaces that I heard in a mini-course from Ozawa. Just as 
$$L^\infty(X,\mu)\subset L^2(X,\mu)$$
which is a subset of all measurable functions, if $(M,tr)$ is a finite von Neumann algebra, $$M=L^\infty(M,tr)\subset L^2(M,tr)\subset \eta(M),$$ the affiliated operators. The inclusion for $L^2(M)$ into $\eta(M)$ is given by
$$
\xi\mapsto (L_\xi\colon m\mapsto \xi m),
$$
(be careful - you need to take the closure of $L_\xi$. Clearly $L_\xi$ commutes with right multiplication by $U(M)$) and the image of $L^2(M)$ is the set of all $T\in \eta(M)$ such that if
$$
|T|=\int t dE(t)
$$
is the usual spectral measure, then
$$
\int t^2 d tr(E(t)) <\infty.
$$
About your comment in response to @Yemon:
Indeed the trace works. If you have a positive function, use indicator functons to show the trace is semi-finite and faithful (see Takesaki I). Normal is clear. If you have a measurable function $f$ on $(X,\mu)$, construct a multiplication operator by letting 
$$
D(M_f)=\{\xi\in L^2(X,\mu)| f\xi \in L^2(X,\mu)\}.
$$
If $\mu$ is finite, and $f$ is a measurable, real valued, a.e. finite function, then $M_f$ is self-adjoint, and the spectrum is the essential range of $f$.
Reed and Simon have a good introduction to unbounded operators, in particular the spectral theorem.
Somehow the brackets aren't showing up for the sets above, but I hope it's legible.
A: This is a very old question but I would like to mention what I think is the most natural response, namely the fact that we can borrow the concept of rings of quotients from algebra.  In the  commutative case, this is transparent: if $f$ is measurable, then we can express it as the quotient of the two bounded, measurable functions $\frac f{1+|f|^2}$ and $\frac 1 {1+|f|^2}$.  Conversely, if $f$ and $g$ are bounded measurable functions and the set where $g$ vanishes is negligible, then $\frac f g$ is a measurable function (we use the usual sloppy notation to talk about equivalence classes of measurable functions).
The non-commutative case is, of course, more delicate but a standard result which is often used to extend the spectral theorem from the bounded to the unbounded case and which can be found in  Riesz-Nagy, states that if $T$ is a closed, densely defined, unbounded linear operator in Hilbert space, then both $T(I+T^\ast T)^{-1}$ and $(I+T^\ast T)^{-1}$ are bounded  and $T$ is their quotient (in the more subtle sense used for unbounded operators).  This suggests that a suitable definition for an unbounded operator $T$ to be associated with a von Neumann algebra $\cal A$ would be  for  these two operators to lie in $\cal A$.
