Matrix element formula in path integral In every book or pdf I read about the path integral, I see:
$$
\begin{array}{ccl}
\langle q_2,t_2|\hat{q}(t_1)|q_0,t_0\rangle & = & \displaystyle{\iint} dq_3dq_4\langle q_2,t_2|q_3,t_1\rangle\langle q_3,t_1|\hat{q}(t_1)|q_4,t_1\rangle\langle q_4,t_1|q_0,t_0\rangle\\
& = &\displaystyle{\iint}dq_3dq_4\langle q_2,t_2|q_3,t_1\rangle q_3\delta(q_3-q_4)\langle q_4,t_1|q_0,t_0\rangle\\
&=&\displaystyle{\int}dq_4\langle q_2,t_2|q_4,t_1\rangle q_4\langle q_4,t_1|q_0,t_0\rangle\\
&=&\displaystyle{\int dq_4\left(q_4\int_{q(t_0)=q_0}^{q(t_1)=q_4}\mathcal{D}[q]e^{iS[q]} \int_{q(t_1)=q_4}^{q(t_2)=t_2}\mathcal{D}[q]e^{iS[q]}\right)}
\end{array}
\tag{1}$$
and then, they directly write:
$$\langle q_2,t_2|\hat{q}(t_1)|q_0,t_0\rangle = \int_{q(t_0)=q_0}^{q(t_2)=t_2}\mathcal{D}[q]e^{iS[q]}q(t_1)\tag 2$$
I guess they use:
$${\displaystyle \langle q_{2},t_{2}|q_{0},t_{0}\rangle = \int d q_4 \langle q_{2},t_{2}|q_{4},t_{1}\rangle \langle q_{4},t_{1}|q_{0},t_{0}\rangle}\tag 3$$
Since it's not explained where I looked, I suppose this is trivial, but I can't manage to find (2) from (1)... I tried integration by part, but it doesn't seem to work.
 A: To see this most clearly, it's necessary to go back to the discretized form of the path integral. There, the measure $\mathcal{D}[q]$ really means $\prod_{i = 1}^{N-1} dq_i$ (up to some normalization). So, discretizing the total time into increments of length $\varepsilon$, with $t_1 = t_0 + N \varepsilon$ and $t_2 = t_1 + M \varepsilon$, and letting $q_i = q(t_0 + \varepsilon i)$, the integrals you wrote take the form
$$
\int dq_4 \int_{q(t_0) = q_0}^{q(t_1) = q_4} \mathcal{D}[q] \int_{q(t_1) = q_4}^{q(t_2) = q_2} \mathcal{D}[q] = \int dq_N \int \prod_{i = 1}^{N-1} dq_i \prod_{i = 1}^{M-1} dq_{N+i} = \int \prod_{i = 1}^{N+M-1} dq_i = \int_{q(t_0) =  q_0}^{q(t_2) = q_2} \mathcal{D}[q]
$$
More intuitively, your integral (1) says "sum over all paths $q(t)$ subject to the constraint $q(t_4) = q_4$, then sum over all possible $q_4$." Upon summing over $q_4$, the total set of paths summed over will no longer have any constraint on $q_4$.
A: You have to use the following property of path integrals,
$$
\int\limits_{q(t_0)=q_0}^{q(t_1)=q_1} [dq] = \int\limits_{-\infty}^\infty dx \int\limits_{f(t_0)=q_0}^{f(T)=x} [df] \int\limits_{g(T)=x}^{g(t_1)=q_1} [dg] \qquad \qquad \forall ~  T \in [t_0,t_1]. \tag{1}
$$
There are several ways to prove this, but I will simply explain this to you intuitively. The LHS is the integral over all possible functions $q:[t_0,t_1]\to{\mathbb R}$ which satisfy the boundary conditions $q(t_0) = q_0$ and $q(t_1) = q_1$. Let us denote this set by ${\cal F}(t_0,q_0 ; t_1 ,q_1)$.
The set ${\cal F}$ can be equivalently described as follows. We first choose a random point $T \in [ t_0 , t_1 ]$. The set ${\cal F}(t_0,q_0 ; t_1 ,q_1)$ can be broken up into infinitely many disjoint subsets ${\cal F}_x(t_0,q_0 ; t_1 ,q_1)$
$$
{\cal F}(t_0,q_0 ;t_1 ,q_1) = \sum_{x\in{\mathbb R}} {\cal F}_{T,x} (t_0,q_0 | t_1 ,q_1) , \qquad {\cal F}_{T,x}(t_0,q_0 ; t_1 ,q_1) = \{ q \in {\cal F}(t_0,q_0 ; t_1 ,q_1) ~| ~  q(T) = x\} . 
$$
In other words, ${\cal F}_{T,x} (t_0,q_0 | t_1 ,q_1)$ is the set of all functions $[t_0,t_1]\to {\mathbb R}$ such that $q(t_0)=q_0$, $q(t_1)=q_1$ and $q(T) = x$. Now, it is clear that
$$
{\cal F}_{T,x} (t_0,q_0 | t_1 ,q_1) = {\cal F} (t_0,q_0 ; T , x ) \cup {\cal F} (T,x; t_1 , q_1  )
$$
If this is NOT clear, take a pause here and think about it. Drawing some graphs for the possible functions on both sides might help.
It then follows
$$
{\cal F}(t_0,q_0 ;t_1 ,q_1) = \sum_{x\in{\mathbb R}} {\cal F} (t_0,q_0 ; T , x ) \cup {\cal F} (T,x; t_1 , q_1  )
$$
The path integral formula (1) represents precisely this property. Again, pause here and think a bit more about why this is the case.
To answer the question in the comments, we have
\begin{align}
&\int\limits_{-\infty}^\infty dx x \int\limits_{q(t_0)=q_0}^{q(T)=x} [dq] \int\limits_{q(T)=x}^{q(t_1)=q_1} [dq]  \\
&\qquad =\int\limits_{-\infty}^\infty dx  \int\limits_{q(t_0)=q_0}^{q(T)=x} [dq] \int\limits_{q(T)=x}^{q(t_1)=q_1} [dq] x \\
&\qquad =\int\limits_{-\infty}^\infty dx  \int\limits_{q(t_0)=q_0}^{q(T)=x} [dq] \int\limits_{q(T)=x}^{q(t_1)=q_1} [dq] q(T) \\
&\qquad = \left( \int\limits_{-\infty}^\infty dx  \int\limits_{q(t_0)=q_0}^{q(T)=x} [dq] \int\limits_{q(T)=x}^{q(t_1)=q_1} [dq] \right) q(T) \\
&\qquad = \int\limits_{q(t_0)=q_0}^{q(t_1)=q_1} [dq]   q(T)
\end{align}
