For an ordered set W = {w1, w2, . . . , wk} of vertices and a vertex v in a connected graph G, the ordered k-vector r(v|W) := (d(v, w1), d(v, w2), . . . , d(v, wk)) is called the metric representation of v with respect to W, where d(x, y) is the distance between vertices x and y. A set W is called a resolving set for G if distinct vertices of G have distinct representations with respect to W. The minimum cardinality of a resolving set for G is its metric dimension. In this paper, we characterize all graphs of order n with metric dimension n - 3.