Problem
I have a multi-qubit state $\lvert \psi \rangle$ and an ancilla qubit $\lvert 0 \rangle$ that I use to extend my state, getting the new state $\lvert 0\rangle \otimes \lvert \psi \rangle$.
Suppose now I apply a generic unitary operation on this state and get a new state
$$ \lvert \phi \rangle = \hat{U}\big(\lvert 0\rangle \otimes \lvert \psi \rangle\big) $$
which can be rewritten as
$$ \lvert \phi \rangle = \lvert 0 \rangle \otimes\lvert a\rangle + \lvert 1 \rangle \otimes\lvert b \rangle $$
say I measure the first qubit and accept the remainder of the state only if the measurement outcome is $0$. Then, overall, I am implementing the transformation
$$ \lvert \psi \rangle \longrightarrow \lvert a\rangle $$
Question
Can this transformation be non-linear in general? In other words: is there a matrix $\hat{B}$ such that $\lvert a \rangle = \hat{B}\lvert \psi\rangle$?