Linear Algebra and Its Applications, Exercise 3.2.4

Exercise 3.2.4. Show that the Schwarz inequality |a^Tb| \le \|a\|\|b\| is an equality if and only if a and b are on the same line through the origin. Describe the situation if a and b are on the opposite sides of the origin.

Answer: We assume that both a and b are nonzero. (If either a = 0 or b = 0 then a^Tb = 0 and either \|a\| = 0 or \|b\| = 0 so that \|a\|\|b\| = 0. So in this case it is trivially true that |a^Tb| = \|a\|\|b\|.) We first show that if |a^Tb| = \|a\|\|b\| then a and b are on the same line through the origin.

If |a^Tb| = \|a\|\|b\| then we have |a^Tb| / \|a\|\|b\| = 1. (We can do the division because per our assumption above both a and b are nonzero and thus the product of their lengths is nonzero.) The denominator is always positive, but the numerator can be either positive or negative. If it is positive then we have a^Tb / \|a\|\|b\| = 1 and if it is negative then we have a^Tb / \|a\|\|b\| = -1. But a^Tb / \|a\|\|b\| = \cos \theta where \theta is the angle between a and b, so we have either \cos \theta = 1 or \cos \theta = -1.

In the former case the angle \theta = 0 (or more generally, \theta = 360^{\circ} \cdot n for some integer n), and a and b lie on the same line through the origin, on the same side of the origin. In the latter case the angle \theta = 180^{\circ} (or more generally, \theta = 180^{\circ} + 360^{\circ} \cdot n for some integer n), and a and b lie on the same line through the origin, but on the opposite side of the origin.

We next show that if a and b are on the same line through the origin  then |a^Tb| = \|a\|\|b\|.

If a and b lie on the same line through the origin, on the same side of the origin, then the angle \theta between a and b is 0. We then have 1 = \cos \theta = a^Tb / \|a\|\|b\| so that a^Tb = \|a\|\|b\|. If a and b lie on the same line through the origin, on the opposite side of the origin, then the angle \theta between a and b is 180^{\circ}. We then have -1 = \cos \theta = a^Tb / \|a\|\|b\| so that -a^Tb = \|a\|\|b\|. Combining the two equations we have |a^Tb| = \|a\|\|b\|.

We have thus shown that |a^Tb| = \|a\|\|b\| if and only if a and b are on the same line through the origin.

As implied by the equations above, if a and b lie on the same line through the origin, on the opposite side of the origin, then \|a\|\|b\| = -a^Tb and the value a^Tb is negative.

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

 Buy me a snack to sponsor more posts like this!

This entry was posted in linear algebra and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s