# Wave function collapse and a general wave function

Action of an operator on a state vector collapses the wave function to any of the eigenstate of that operator , So we get resulting state of the system as some base ket. But mathematically action of operator on a state vector change state vector to another state vector which is the superposition of all basis eigenkets, So how can we incorporate collapse of wave function and action of operator?

Not all operators transform a ket into a superposition of kets: for instance $$\hat \Pi=\vert\psi\rangle\langle\psi\vert$$ acting on a state $$\vert \Psi\rangle$$ will produce $$\vert\psi\rangle\langle\psi\vert\Psi\rangle$$, which is not a normalized ket and not a linear combination of kets either.

An operator like $$\hat \Pi$$ is a projection operator and is idempotent, i.e. $$\hat\Pi\hat \Pi=\hat \Pi$$; projection operators serve as basic prototypes for measurement operators.

You have a misunderstanding here. The action of an observable operator like $$x$$ or $$p= -i\frac{\partial}{\partial x}$$ does not change the wave function into a collapsed state. The operator which does that is a projector, like:

$$|x=1\rangle \langle x=1|$$

or
$$|x=-12.531\rangle \langle x=-12.531|$$

or

$$|p=0\rangle \langle p=0|$$

Which projector you apply depends on the measurement result and what you are measuring. The ones above apply to the results $$x=1$$, $$x=-12.531$$, and $$p=0$$, respectively (I left out units since they're not important to the point).

If you want to calculate these projectors: they are outer products of the eigenvectors of the corresponding operators. For example, $$\hat{x}|x=-12.531\rangle = -12.531 |x=-12.531\rangle$$

The projectors above will not leave you with a superposition (at least not in the x, x, and p basis, respectively). In general, whether a vector is in a superposition depends on the basis you express it in.