The top-quark mass is measured in proton-proton collisions at sqrt(s) = 7 TeV using a data sample corresponding to an integrated luminosity of 5.0 inverse femtobarns collected by the CMS experiment at the LHC. The measurement is performed in the dilepton decay channel t t-bar to ell+ nu[ell] b, ell- anti-nu[ell] b-bar, where ell=e,mu. Candidate top-quark decays are selected by requiring two leptons, at least two jets, and imbalance in transverse momentum. The mass is reconstructed with an analytical matrix weighting technique using distributions derived from simulated samples. Using a maximum-likelihood fit, the top-quark mass is determined to be 172.5 +/- 0.4 (stat) +/- 1.5 (syst) GeV.