Revisiting Spherical Trigonometry with Orthogonal ... - Semantic Scholar

1 downloads 0 Views 129KB Size Report
Jul 26, 2004 - Sudipto Banerjee ([email protected]) received his B.S. in Statistics from the University of Calcutta, India, an M.Stat. from the Indian ...
Integre Technical Publishing Co., Inc.

College Mathematics Journal 35:5

July 26, 2004

8:38 a.m.

banerjee.tex

page 375

Revisiting Spherical Trigonometry with Orthogonal Projectors Sudipto Banerjee

Sudipto Banerjee ([email protected]) received his B.S. in Statistics from the University of Calcutta, India, an M.Stat. from the Indian Statistical Institute, Calcutta, and then his M.S. and Ph.D. from the University of Connecticut, Storrs. He is currently an Assistant Professor in the University of Minnesota, Minneapolis, where his research interests include spatial statistics and modelling. When not dabbling in mathematics, he enjoys dining out on exotic cuisine and spending time with his wife.

Introduction Spherical trigonometry is an ancient subject that studies mathematical techniques of measurements on a sphere. Traditionally, it was applied to problems in terrestrial navigation, astronomy, geodesic computations, and map projections. At one time it was a thriving subject on its own merits, but it gradually lost its prominence as mathematicians developed more general geometries, relegating it to special instances of the latter. However, several formulas from spherical trigonometry continue to have application today in evolving disciplines such as Global Positioning Systems, digital cartography, and spatial statistics. The traditional development of the subject, as documented in numerous mathematical texts and papers, typically involve non-trivial vector product identities (for example, [5, pp. 43–77], or some deeper results in differential geometry (Clairaut’s Theorem; for example, [3, p. 267]), or even groups of rotations, as in [2] and [6]. These developments, while mathematically rich, often preclude easy access to derivations— especially for researchers and educators in other disciplines. For example, some spatial data analysis texts (such as [1]) mention the use of spherical trigonometry formulas in geodetic computations, but do not provide derivations. In [8], the theory behind Global Positioning Systems is developed using linear algebra; again, the laws of spherical trigonometry are used (p. 488), but not derived. The reluctance to derive spherical trigonometry formulas is probably because they are deemed a digression from the primary focus of disciplines that use them. With today’s applied curricula emphasizing computational aspects (primarily using linear algebra) more than geometric development, it may be of interest to use linear algebra to develop spherical trigonometry. This is not an unnatural thought (given that linear algebra imparts an algorithmic flavor to geometric concepts) and in this article we provide such a development. This article does not pretend to undertake an in-depth study of either spherical trigonometry or linear algebra. Rather, it is more about building a bridge between these two seemingly disparate subjects. We will look at two of the most conspicuous results from spherical trigonometry and how basic linear algebra can be used to derive them. VOL. 35, NO. 5, NOVEMBER 2004 THE COLLEGE MATHEMATICS JOURNAL

375

Integre Technical Publishing Co., Inc.

College Mathematics Journal 35:5

July 26, 2004

8:38 a.m.

banerjee.tex

page 376

The two basic laws of a spherical triangle A spherical triangle ABC, as shown in Figure 1, has vertices A, B, and C on the surface of the sphere, and its three “sides” (denoted a, b, and c) are geodesic arcs (great circle arcs) joining the vertices. In fact, a spherical triangle has six angles— three side angles and three vertex angles (also called azimuthal angles). For example, with O as the center of the sphere, the “side” a is the angle subtended between vectors − → −→ OB and OC, while the vertex angle A is the angle between the two planes containing   Thus, for a sphere of unit radius the side angle a is, in fact, the arc arcs AB and AC. length (for a sphere of radius R, the arc length is Ra). Also, as is customary in plane trigonometry, we will use A, B and C to refer to both the points on the sphere and the vertex angles at these points (it will be clear from the context which is meant). A

b c

C a

B

Figure 1. A geodesic triangle with its six angles. Note that the arcs a, b and c are arcs of great circles. That is why these triangles are also called geodesic triangles.

Analogous to the trigonometry of planar triangles, there is a law of cosines and a law of sines for spherical triangles. These two laws are fundamental in that all other laws of spherical trigonometry can be derived from them. In the present setting, the law of cosines states cos a = cos b cos c + sin b sin c cos A,

(1)

and the law of sines states sin A sin B sin C = = . sin a sin b sin c

(2)

In a certain sense, these laws may be looked upon as generalizations of their counterparts in plane trigonometry. In fact, the plane laws are recovered if the side angles are replaced by arc lengths and the radius of the sphere is taken to be infinite. For ˆ example, in the law of sines, replace a, b and c by a/R, ˆ b/R and c/R ˆ respectively, ˆ where a, ˆ b and cˆ are arc lengths and R is the radius of the sphere. Rewriting the law 376

c THE MATHEMATICAL ASSOCIATION OF AMERICA 

Integre Technical Publishing Co., Inc.

College Mathematics Journal 35:5

July 26, 2004

8:38 a.m.

banerjee.tex

page 377

of sines as sin B sin A sin C = = ˆ R sin(a/R) ˆ R sin(c/R) ˆ R sin(b/R) and letting R → ∞ yields the planar law of sines. Likewise, applying the Taylor approximation cos(x) ≈ 1 − x 2 /2 after substituting arc-lengths for the side angles leads to the planar law of cosines. One useful application of the cosine formula is in computing distances between two points on the earth’s surface. The cosine law solves a spherical triangle given two of its side angles and the included vertex angle. More precisely, given the measure of A, b, and c, the cosine law determines a. This is precisely the problem of finding the geodetic distance between points B and C. To see this, consider a spherical triangle with A as the North Pole. Then, if (λ1 , θ1 ) and (λ2 , θ2 ) are the geographical coordinates of B and C respectively, we see that b = π/2 − θ1 , c = π/2 − θ2 , and A = λ2 − λ1 . Plugging these into the cosine law leads to the geodetic distance D of   R arccos sin θ1 sin θ2 + cos θ1 cos θ2 cos (λ1 − λ2 ) , where R is the radius of the earth (which will be taken as 6371 km). In fact, all our numerical examples are approximate, involving round-off. Example. To obtain the geodetic distance between Chicago (87.63W, 41.88N) and Minneapolis (93.22W, 44.89N), we substitute the appropriate values in the above formula and obtain the desired distance as 6371 × arccos(0.9961) or about 562 km. Another use of these laws is in determining the locations of points in a given direction and distance from a known location. In addition to navigators and engineers, spatial analysts encounter this problem when choosing locations for assessing predictive performance of their models, or when designing a pollutant-monitoring network for data collection. Example. With reference to Figure 1, given the geographical coordinates of the point B, say Minneapolis (93.22W, 44.89N ), suppose we want to determine the location of the point C—at a distance a, say 562 km from B, along an azimuthal angle (the vertex angle B) of 124.59 degrees East. From the latitude of B, we find c = 0.787 radians. The distance 562 km means that side angle a is 0.088 radians, and so we use the law of cosines to deduce the side b from (1): b = arccos(cos a cos c + sin a sin c cos B) = 0.84 radians. This immediately gives us the latitude of vertex C as π/2 − b, which converts to 41.88 degrees N. Next, angle A can be found using the law of sines as   | sin B| A = arcsin | sin a| = 0.098 radians, | sin b| or 5.59 degrees. Since vertex angle A is the difference in longitudes, the longitude of C is −93.22 + 5.59 = −87.63, thus yielding the geographical coordinates of vertex C as (87.63W, 41.88N) (Chicago). Note that the “inverse” problem of obtaining the azimuthal angle between B and C, given their geographical locations, can also be easily solved using the two laws. VOL. 35, NO. 5, NOVEMBER 2004 THE COLLEGE MATHEMATICS JOURNAL

377

Integre Technical Publishing Co., Inc.

College Mathematics Journal 35:5

July 26, 2004

8:38 a.m.

banerjee.tex

page 378

Orthogonal projectors We briefly review the fundamental properties of orthogonal projectors in Euclidean spaces, outlining the properties to be used in later sections. Much of this material appears in standard linear algebra texts (for example [4] and [7]), but we briefly discuss the results we use later. In general Euclidean space, Rn , consider a vector y and a n × p(< n) matrix X . The p column vectors of X span a vector space, which we denote by C (X ). Since any vector in C (X ) is a linear combination of the columns of X , it can be written as X α, for some α in R p . The projection of y on C (X ) is the vector X α0 , which is orthogonal to every vector in C (X ). That is, y − X α0 , X α = 0 for all α ∈ R p , where x, y is the inner product (or dot product), yT x. The above orthogonality leads to the normal equations of least square theory, X T (y − X α0 ) = 0 or X T X α0 = X T y. The inverse, (X T X )−1 , is guaranteed to exist if we assume that the column vectors of X are independent (which we do for the remainder of this article), so the (orthogonal) projection of y onto C (X ) is given by X (X T X )−1 X T y. Clearly, projection is a linear transformation and we can write it as PX y, where PX = X (X T X )−1 X T is the matrix of the transformation. This matrix is called the orthogonal projector, projecting on C (X ) along C (X )⊥ (the space orthogonal to C (X )). It is easily seen that PX is symmetric (PX = PXT ) and idempotent (PX2 = PX ). Also PX X = X , which means that the projector keeps every vector in C (X ) invariant. In fact, (I − PX ) is the projector into C (X )⊥ , and any vector y in R n can be written as y = PX y + (I − PX )y (the sum of the projections of y on C (X ) and C (X )⊥ ). If we take an orthonormal {u1 , . . . , u p } as the columns of X then X T X = I and  p basis so PX = X X T = i=1 ui uiT . In three dimensions, for example, the projection of a point y onto a unit vector n is P[n] y = nnT y and so the projection of y on the plane whose normal is n is given by (I − P[n] )y. Another property of projectors that we will use later is the orthogonal decomposition property. Let X 1 and X 2 be n × p1 and n × p2 matrices respectively that form the n × ( p1 + p2 ) partitioned matrix X = [X 1 : X 2 ] with full column rank so that (X T X )−1 exists. The orthogonal decomposition property says that P[X 1 :X 2 ] = PX 1 + P(I −PX 1 )X 2 = PX 2 + P(I −PX 2 )X 1 .

(3)

This can be easily derived from the theory of direct sums (see, for example [4, pp. 385–386]), but a direct verification is also easy. The normal equations for X now become    T   T α1 X1 X 1 X 1 X 1T X 2 = y. α2 X 2T X 1 X 2T X 2 X 2T Obtaining α1 = (X 1T X 1 )−1 (X 1T y − X 1T X 2 α2 ) from the top row-equation (note that the columns of X 1 are independent, so (X 1T X 1 )−1 exists) and substituting into the second, we obtain X 2T (I − PX 1 )X 2 α2 = X 2T (I − PX 1 )y. Furthermore, using results for determinants of partitioned matrices, we have |X T X | = |X 1T X 1 ||X 2T (I − PX 1 )X 2 |. Since X and X 1 are both of full column rank, |X T X | and |X 1T X 1 | are both non-zero, implying that [X 2T (I − PX 1 )X 2 ]−1 exists (even though (I − PX 1 )−1 does not). The orthogonal decomposition property now follows by substituting the solutions for α1 and α2 in P[X 1 :X 2 ] y = X 1 α1 + X 2 α2 . The second equality in (3) follows by interchanging the roles of X 1 and X 2 . In the next section we return to spherical trigonometry and use these properties to derive the laws of sines and cosines. 378

c THE MATHEMATICAL ASSOCIATION OF AMERICA 

Integre Technical Publishing Co., Inc.

College Mathematics Journal 35:5

July 26, 2004

8:38 a.m.

banerjee.tex

page 379

Derivations of the spherical laws of cosine and sine We now derive the laws of cosines and sines for spherical triangles, using results from the previous section. Our derivations will follow from expressing the six angles of the spherical triangle in terms of suitable projections. A b

c C n

v

B u a O A

(I–P[n])v

(I–P[n])u

The equatorial plane – orthogonal to n

Figure 2. The geodesic triangle shown in relation to the equatorial plane. The use of projectors seems natural for deriving the cosine law—the angle A is the projection of a on the equatorial plane.

In Figure 2, O is the center of the sphere with unit radius (no loss of generality − → − → −→ here), and n, u, and v are the unit vectors in the directions OA, OB, and OC respectively. Clearly a is the angle between u and v; furthermore angle A, being the angle between planes OAB and OAC, is precisely the angle between the projection vectors (I − P[n] )u and (I − P[n] )v. Similar relationships hold for the other angles, leading to the following expressions of the six angles, cos a = u, v ,

cos A =

(I − P[n] )u, (I − P[n] )v , (I − P[n] )u(I − P[n] )v

cos b = v, n ,

cos B =

(I − P[u] )v, (I − P[u] )n , (I − P[u] )v(I − P[u] )n

cos c = u, n ,

cos C =

(I − P[v] )u,(I − P[v] )n , (I − P[v] )u(I − P[v] )n

VOL. 35, NO. 5, NOVEMBER 2004 THE COLLEGE MATHEMATICS JOURNAL

379

Integre Technical Publishing Co., Inc.

College Mathematics Journal 35:5

July 26, 2004

8:38 a.m.

banerjee.tex

page 380

where  ·  is the norm (length) of the vector. Using the symmetry and idempotent properties of projectors, we obtain cos A = 

u, v − u, P[n] v  1 − u, P[n] u 1 − v, P[n] v

Since c is the angle between u and n, we have u, P[n] u = (uT n)2 = cos2 c. Analogously, v, P[n] v = cos2 b and u, P[n] v = cos b cos c. Thus, cos a − cos c cos b , sin c sin b

cos A =

which is equivalent to (1). At this point, using simple trigonometric manipulation, one can show from the law of cosines that sin2 A 1 − cos2 a − cos2 b − cos2 c + 2 cos a cos b cos c = . sin2 a sin2 a sin2 b sin2 c Since the right hand side is a symmetric function of a, b and c, we get the law of sines immediately. This reveals the law of cosines to be more fundamental than the law of sines. Nevertheless, we use orthogonal projectors to derive the law of sines independently—particularly to bring out the connection with the orthogonal decomposition property. The geometric idea for deriving the sine law comes from Figure 3, which shows the spherical triangle ABC oriented so that the u-v plane is horizontal. The sine law follows from expressing the projection of n onto the u-v plane in two equivalent ways, first in terms of the projection along u and then of the projection along v. The orthogonal decomposition property of projectors implies that P[u,v] = P[u] + P[(I −P[u] )v] = P[v] + P[(I −P[v] )u] . A

n

v

C

C

O B

P[u,v]n

u

B

Figure 3. The spherical triangle of Figure 1 seen from a different orientation. This motivates the projection argument for deriving the sine law.

380

c THE MATHEMATICAL ASSOCIATION OF AMERICA 

Integre Technical Publishing Co., Inc.

College Mathematics Journal 35:5

July 26, 2004

8:38 a.m.

banerjee.tex

page 381

From the expressions of the angles given, n, P[u] n = (uT n)2 = cos2 c, so that (I − P[u] )n2 = sin2 c. It now follows from the first of these equalities that 

    nT (I − P[u] )vvT (I − P[u] )n n, I − P[u,v] n = nT I − P[u] n − vT (I − P[u] )v

2 (I − P[u] )n, (I − P[u] )v 2 = (I − P[u] )n − (I − P[u] )v2

  2   2 = I − P[u] n − I − P[u] n cos2 B = sin2 c sin2 B.

Likewise,

     2  nT I − P[u,v] n = I − P[v] n 1 − cos2 C = sin2 b sin2 C, so sin2 c sin2 B = sin2 b sin2 C. After interchanging the roles of the angles, we find that 

sin A sin a



2 =

sin B sin b



2 =

sin C sin c

2 .

This agrees with the law of sines in Equation (2), up to an ambiguity in sign. In fact, this ambiguity can be resolved by restricting the angle measures appropriately (usually implicit in the application at hand).

Summary and conclusions This article demonstrated the use of basic linear algebra to derive the laws of sines and cosines for spherical triangles. It is hoped that this will offer greater accessibility to basic spherical trigonometry than some of the more traditional treatments. From a teaching perspective, instructors can present these as applications of linear algebra— especially so in courses on spatial analysis and Global Positioning Systems, where both linear algebra and spherical geometry are recurring themes.

References 1. N. A. C. Cressie, Statistics for Spatial Data, 2nd ed., Wiley, 1993. 2. F. Desbouvries and P. Regalia, A minimal rotation-based FRLS lattice algorithm, IEEE Transactions on Signal Processing 45 (1997) 1371–1374. 3. H. W. Guggenheimer, Differential Geometry, Dover, 1977. 4. D. A. Harville, Matrix Algebra from a Statistician’s Perspective, Springer-Verlag, 1997. 5. G. A. Jennings, Modern Geometry with Applications, Springer-Verlag, 1994. 6. J. B. Kuipers, Quaternions and Rotation Sequences, Princeton University Press, 1999. 7. C. D. Meyer, Matrix Analysis and Applied Linear Algebra, Society for Industrial and Applied Mathematics, 2000. 8. G. Strang and K. Borre, Linear Algebra, Geodesy and GPS, Wellesley-Cambridge Press, 1997.

VOL. 35, NO. 5, NOVEMBER 2004 THE COLLEGE MATHEMATICS JOURNAL

381