Besides graphite, diamond, graphene, carbon nanotubes, and fullerenes etc., there is another allotrope of carbon: carbyne, existing in the form of a onedimensional chain of carbon atoms. It has been theoretically predicted that carbyne would be stronger, stiffer and more exotic than other materials that have been synthesized before. In this article, the two kinds of carbyne, i.e., cumulene and polyyne, are investigated by the first principles, where the mechanical properties, electronic structure, optical and phonon properties of the two carbynes are calculated.The results on the crystal binding energy and the formation energy show that polyyne is more stable and harder than cumulene, and both are difficult to be synthesized from diamond or graphite. The tensile stiffness, bond stiffness and Young's modulus of cumulene are 94.669 eV/Å, 90.334GPa and 60.62GPa, respectively; while the corresponding values of polyyne are 94.939eV/Å, 101.42GPa and 60.06GPa, respectively. The supercell calculation shows that carbyne is the most stable at N=5, where N is the supercell number. It indicates that the carbon chain with 10 atoms is the most stable. The calculation on the electronic band structure shows that cumulene is conductor, while polyyne is semiconductor with a band gap as 0.37eV. The dielectric function of carbynes varies in different direction, consistent with the one dimensional nature of the carbon chains. In the phonon dispersion of cumulene there are imaginary frequencies with the lowest value down to -3.817THz, which indicates that cumulene could be unstable at room temperature and normal pressure.