We report first-principles calculations of the inelastic current-voltage (I-V) characteristics of a gold point contact and a molecular junction in the nonresonant regime. Discontinuities in the I-V curves appear in correspondence to the normal modes of the structures. Due to the quasi-onedimensional nature of these systems, specific modes with large longitudinal component dominate the inelastic I-V curves. In the case of the gold point contact, our results are in good agreement with recent experimental data. For the molecular junction, we find that the inelastic I-V curves are quite sensitive to the structure of the contact between the molecule and the electrodes thus providing a powerful tool to extract the bonding geometry in molecular wires.Inelastic scattering between electrons and phonons in a current-carrying wire is a source of energy dissipation for electrons. However, it can also yield a lot of information on the underlying atomic structure of the wire. This information can be extracted indirectly from the discontinuities in conductance that occur when the external bias is large enough to excite discrete vibrational modes of the wire.[1] Recent experiments on transport properties of atomic [2] and molecular [3, 4] junctions have indeed revealed such inelastic features. It is, however, not straightforward to relate these features to specific vibrational modes. A nanoscale junction (often described as a quasione-dimensional system) with N atoms supports 3N vibrational modes. In a strictly one-dimensional system, only longitudinal modes can be excited via electronic coupling. However, the modes of a realistic junction are not necessarily purely transverse or purely longitudinal with respect to the direction of current flow. [5,6,7] Therefore, the inelastic current-voltage (I-V) characteristics are likely to depend strongly on the detailed atomic structure of the full system. This is particularly relevant for molecular junctions for which the contact geometry between the molecule and the bulk electrodes is difficult to control in experiments. [8,9] In this letter we first derive an expression for the inelastic current in a current-carrying system in terms of scattering wavefunctions. This expression allows us to study the inelastic I-V characteristics of a given nanoscale junction using first-principles approaches. As an example we study the effect of vibrations on the electron dynamics in a gold point contact and a single-molecule junction. For the gold point contact, the magnitude of the calculated inelastic current as well as its onset compare very well with recent experimental results.[2] For the molecular junction, we analyze the case in which the molecule is equally bonded to the two bulk electrodes and the case in which the two contacts are different. We find that the inelastic I-V characteristics are very different in the two cases. This result shows that inelastic spectroscopy could be used quite effectively to extract information on the contact geometry of molecular wires.Let us start by derivin...