How much thrust is needed by an aircraft to have vertical takeoff?
First, let's agree on terminology: What you saw in airshows is a vertical flight path. Flying horizontally first, the airplane pitched up until the nose was pointing straight into the sky.  

Surprisingly, no thrust is needed to perform this maneuver. Even gliders can do it. What happens is that kinetic energy is converted to potential energy, the rate of potential energy increase being proportional to flight speed and aircraft mass. If you start fast enough, this vertical flying can be maintained for several seconds, until the aircraft runs out of speed and stops in midair, followed by an uncontrolled drop. Skilled pilots orient the aircraft in the right direction by starting a rotation around the vertical axis at the top of the climb, so the following drop lets them pick up speed again with the correct nose-down attitude. Now potential energy is converted back into kinetic energy until speed is sufficient for a pullout. In aerobatics, this maneuver is called a stall turn or a hammerhead stall.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

A few conditions apply, however. The airplane must be able to fly fast enough to have the needed potential energy to sustain the maneuver through the pitch-up phase. This is helped if its engines add energy, so the kinetic energy bleeds off more slowly. Also, at the top of the maneuver it is flying at zero g, and this requires at least that all items on board are securely fastened. Lastly, the pitch-up needs a load factor bigger than 1 g, and the higher the maximum load factor is, the tighter this pitch-up can be flown.



Now the question has been changed: The vertical flight path is flown right after take-off. This limits the entry speed for the maneuver, and gliders will not be able to do this. If we take the 737 from the question and fly it with no payload and little fuel, the flight mass $m$ of a 737-700 is 40&nbsp;tons, and the installed thrust is about 200&nbsp;kN (sea level static). Let's assume that the pilot accelerates after takeoff to a horizontal speed $v$ = 100&nbsp;m/s (194&nbsp;KTAS) while retracting the flaps, the kinetic energy ($0.5\cdot m\cdot v^2$) is equivalent to a potential energy ($m \cdot g \cdot h$) of an altitude gain h of $$h = \frac{v^2}{2\cdot g} = 510 m$$
The engines deliver less thrust with increasing speed; maybe 40% of the weight, so the airplane will still accelerate for the first 18° - 20° of the 90° flight path change. This will delay the point when speed has been bled off and add maybe 150&nbsp;m to h. At 100&nbsp;m/s a pull-up with a radius of 500&nbsp;m will add a load factor of 2&nbsp;g. The pilot needs to pull less first and harder at the end of the maneuver in order to stay within the maximum load factor of 2.5. When speed bleeds off, so will wing lift, and in the second half of the pull-up the wing will not create enough lift to change the flight path enough in order to reach the desired vertical attitude. Also, the aircraft will be very low for a safe recovery.

This makes it rather doubtful that an airliner can be pulled up to a vertical climb after takeoff. If the maneuver is started at a higher speed and with a little more distance from the ground, I see no reason why it should not safely be possible.