  The cohesion and conductance of a point contact in a two-dimensional metallic
nanowire are investigated in an independent-electron model with hard-wall
boundary conditions. All properties of the nanowire are related to the Green's
function of the electronic scattering problem, which is solved exactly via a
modified recursive Green's function algorithm. Our results confirm the validity
of a previous approach based on the WKB approximation for a long constriction,
but find an enhancement of cohesion for shorter constrictions. Surprisingly,
the cohesion persists even after the last conductance channel has been closed.
For disordered nanowires, a statistical analysis yields well-defined peaks in
the conductance histograms even when individual conductance traces do not show
well-defined plateaus. The shifts of the peaks below integer multiples of
$2e^2/h$, as well as the peak heights and widths, are found to be in excellent
agreement with predictions based on random matrix theory, and are similar to
those observed experimentally. Thus abrupt changes in the wire geometry are not
necessary for reproducing the observed conductance histograms. The effect of
disorder on cohesion is found to be quite strong and very sensitive to the
particular configuration of impurities at the center of the constriction.
