  In quantum theory, a measurement context is defined by an orthogonal basis in
a Hilbert space, where each basis vector represents a specific measurement
outcome. The precise quantitative relation between two different measurement
contexts can thus be characterized by the inner products of nonorthogonal
states in that Hilbert space. Here, we use measurement outcomes that are shared
by different contexts to derive specific quantitative relations between the
inner products of the Hilbert space vectors that represent the different
contexts. It is shown that the probabilities that describe the paradoxes of
quantum contextuality can be derived from a very small number of inner
products, revealing details of the fundamental relations between measurement
contexts that go beyond a basic violation of noncontextual limits. The
application of our analysis to a product space of two systems reveals that the
nonlocality of quantum entanglement can be traced back to a local inner product
representing the relation between measurement contexts in only one system. Our
results thus indicate that the essential nonclassical features of quantum
mechanics can be traced back to the fundamental difference between quantum
superpositions and classical alternatives.
