Let T be a tree with vertices V(T)={1,…,n}. The distance between vertices i,j∈V(T), denoted dij, is defined to be the length (the number of edges) of the path from i to j. We set dii=0,i=1,…,n. The squared distance matrix Δ of T is the n×n matrix with (i,j)-element equal to 0 if i=j, and dij2 if i≠j. It is known that Δ is nonsingular if and only if the tree has at most one vertex of degree 2. We obtain a formula for Δ−1, if it exists. When the tree has no vertex of degree 2, the formula is particularly simple and depends on a certain “two-step” Laplacian of the tree. We determine the inertia of Δ. The inverse and the inertia of the edge orientation matrix are also described.