In this paper, we study the weighted Fermat-Frechet problem for a \(\frac{N (N+1)}{2}\) -tuple of positive real numbers determining N-simplexes or an N-simplex in the N-dimensional K-space (N-dimensional Euclidean space \(\mathbb {R}^{N}\) if \(K=0\) , the N-dimensional open hemisphere of radius \(\frac{1}{\sqrt{K}}\) ( \(\mathbb {S}_{\frac{1}{\sqrt{K}}}^{N}\) ) if \(K >0\) and the Lobachevsky space \(\mathbb {H}_{K}^{N}\) of constant curvature K if \(K<0\) ). The (weighted) Fermat-Frechet problem is a new generalization of the (weighted) Fermat problem for N-simplexes. We control the number of solutions (weighted Fermat trees) with respect to the weighted Fermat-Frechet problem that we call a weighted Fermat-Frechet multitree, by using some conditions for the edge lengths discovered by Dekster–Wilker. We use the isometric immersion of Godel-Schoenberg for N-simplexes in the N-sphere and the isometric immersion of Gromov (up to an additive constant) for weighted Fermat (Steiner) trees in the N-hyperbolic space \(\mathbb {H}_{K}^{N},\) in order to construct an isometric immersion of a weighted Fermat-Frechet multitree in the K-space. Finally, we create a new variational method, which differs from Schlafli’s, Luo’s and Milnor’s techniques to differentiate the length of a geodesic arc with respect to a variable geodesic arc, in the 3K-space. By applying this method, we eliminate one variable geodesic arc from a system of equations, which gives the weighted Fermat-Frechet solution for a sextuple of edge lengths determining (Frechet) tetrahedra.