


































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



































These notes are intended for use in the warm-up camp for incoming Berkeley Statistics graduate students. Welcome to Cal! We assume that you have taken a linear algebra course before and that most of the material in these notes will be a review of what you already know. If you have never taken such a course before, you are strongly encouraged to do so by taking math 110 (or the honors version of it), or by covering material presented and/or mentioned here on your own. If some of the material is unfamiliar, do not be intimidated! We hope you find these notes helpful! If not, you can consult the references listed at the end, or any other textbooks of your choice for more information or another style of presentation (most of the proofs on linear algebra part have been adopted from Strang, the proof of F-test from Montgomery et al, and the proof of bivariate normal density from Bickel and Doksum). Go Bears!
2 Vector Spaces
A set V is a vector space over R and its elements are called vectors if there are 2 opera- tions defined on it:
that satisfy the following 8 conditions ∀ v 1 , v 2 , v 3 ∈ V and ∀ r 1 , r 2 ∈ R:
We say that S ⊂ V is a subspace of V , if S is closed under vector addition and scalar multiplication, i.e.
You can verify that if those conditions hold, S is a vector space in its own right (satisfies the 8 conditions above). Note also that S has to be non-empty, empty set is not allowed as a subspace. Examples:
For all of the above examples, you should check for yourself that they are in fact subspaces. You can also verify for yourself that the 2 conditions are indpendent of each other, by coming up with 2 subsets of R^2 : one that is closed under addition and subtraction but NOT under
scalar multiplication, and one that is closed under scalar multiplication but NOT under ad- dition/subtraction.
Given vectors v 1 , v 2 ,... , vn ∈ V , we say that w ∈ V is a linear combination of v 1 , v 2 ,... , vn if for some r 1 , r 2 ,... , rn ∈ R, we have w = r 1 v 1 + r 2 v 2 +... + rnvn. If ev- ery vector in V is a linear combination of v 1 , v 2 ,... , vn, then we say that v 1 , v 2 ,... , vn span V. Given vectors v 1 , v 2 ,... , vn ∈ V we say that v 1 , v 2 ,... , vn are linearly independent if r 1 v 1 + r 2 v 2 +... + rnvn = 0 =⇒ r 1 = r 2 =... = rn = 0, i.e. the only linear combination of v 1 , v 2 ,... , vn that produces 0 vector is the trivial one. We say that v 1 , v 2 ,... , vn are linearly dependent otherwise. Now suppose that v 1 , v 2 ,... , vn span V and that, moreover, they are linearly independent. Then we say that the set {v 1 , v 2 ,... , vn} is a basis for V.
Theorem: Let {v 1 , v 2 ,... vn} be a basis for V , and let {w 1 , w 2 ,... , wm} be another basis for V. Then n = m.
Proof: Omitted, but can be found in any book on linear algebra.
^ ,^ e^2 =
^ , and^ e^3 =
^ form the standard basis for^ R
(^3) , since every
vector
x 1 x 2 x 3
^ in^ R
(^3) can be written as x 1 e 1 + x 2 e 2 + x 3 e 3 , so the three vectors span R 3
and their linear independence is easy to show. In general, Rn^ has dimension n.
An inner product is a function f : V × V → R (which we denote by f (v 1 , v 2 ) =< v 1 , v 2 >), s.t. ∀ v, w, z ∈ V , and ∀r ∈ R:
We note here that not all vector spaces have inner products defined on them, but we will only be dealing with the ones that do. Examples:
x 1 x 2 ... xn
and y =
y 1 y 2 ... yn
in Rn, we define their inner product x′y
=< x, y > = ∑^ n i=1^ xiyi. You can check yourself that the 3 properties above are satisfied, and the meaning of notation x′y will become clear from the next section.
We say that vectors v, w in V are orthogonal if < v, w >= 0. Notice that the zero vector is the only vector orthogonal to itself (why?). Examples:
complement of T in V , if S contains ALL vectors orthogonal to vectors in T and we write S = T ⊥. For example, the x-axis and y-axis are orthogonal subspaces of R^3 , but they are
not orthogonal complements of each other, since y-axis does not contain
^ , which is
perpendicular to every vector in x-axis. However, y-z plane and x-axis ARE orthogonal complements of each other in R^3. You should prove as an exersise that if dim(V ) = n, and dim(S) = k, then dim(S⊥) = n − k.
Suppose we’re given linearly independent vectors v 1 , v 2 ,... , vn in V , and there’s inner product defined on V. Then we know that v 1 , v 2 ,... , vn form a basis for the subspace which they span (why?), and we can find an orthogonal basis for this subspace as follows. Let q 1 = v 1 Suppose v 2 is not orthogonal to v 1. then let rv 1 be the projection of v 2 on v 1 , i.e. we want to find r ∈ R s.t. q 2 = v 2 − rq 1 is orthogonal to q 1. Well, we should have < q 1 , (v 2 − rq 1 ) >= 0, and we get r = <q <q^11 ,v,q^21 >>. Notice that the span of q 1 , q 2 is the same as the span of v 1 , v 2 , since all we did was to subtract multiples of original vectors from other original vectors. Proceeding in similar fashion, we obtain qi = vi −^ ((^ <q <q 11 ,v,qi 1 >>^ ) q 1 +... +^ (^ <q<qi−i− 11 ,q,vi−i> 1 >^ ) qi− 1 ) , and we thus end up with an orthogonal basis for the subspace. If we furthermore divide each of the resulting vectors q 1 , q 2 ,... , qn by its length, we are left with orthonormal basis, i.e. < qi, qj >= 0 ∀i 6 = j and < qi, qi >= 1 ∀i (why?). We call these vectors that have length 1
unit vectors. As an exersise, you can now construct an orthonormal basis for the subspace of F[− 1 ,1] spanned by f (x) = 1, g(x) = x, and h(x) = x^2. An important point to take away is that given any basis for finite-dimensional V , if there’s an inner product defined on V , we can always turn the given basis into an orthonormal basis.
3 Matrices and Matrix Alegbra
An m × n matrix A is a rectangular array of numbers that has m rows and n columns, and we write:
a 11 a 12... a 1 n a 21 a 22... a 2 n ......... ... am 1 am 2... amn
For the time being we’ll restrict ourselves to real matrices, so ∀ 1 ≤ i ≤ m and ∀ 1 ≤ j ≤ n,
aij ∈ R. Notice that a familiar vector x =
x 1 x 2 ... xn
∈ Rn^ is just a n × 1 matrix (we say x is
a column vector. A 1 × n matrix is referred to as a row vector. If m = n, we say that A is square.
of A (see below for definition of column space).
Let A be m × n, then we say that transpose of A is the n × m matrix A′, s.t. aij = a′ ji. Now the notation we used to define the inner product on Rn^ makes sense, since given two n × 1 column vectors x and y, their inner product < x, y > is just x′y according to matrix multiplication. Let In×n, denote the n × n identity matrix, i.e. the matrix that has 1’s down its main diagonal and 0’s everywhere else (in future we might omit the dimensional subscript and just write I, the dimension should always be clear from the context). You should check that in that case, In×nA = AIn×n = A for every n × n A. We say that n × n A, has n × n inverse, denoted A−^1 , if AA−^1 = A−^1 A = In×n. If A has inverse, we say that A is invertible. Not every matrix has inverse, as you can easily see by considering the n × n zero matrix. We will assume that you are familiar with the use of elimination to calculate inverses of invertible matrices and will not present this material. The following are some important results about inverses and transposes:
You should prove all of these identities as an exersise.
Let A be m × n. We will denote by col(A) the subspace of Rm^ that is spanned by columns of A, and we’ll call this subspace column space of A. Similarly, we define the row space of A to be the subspace of Rn^ spanned by rows of A and we notice that it is precisely col(A′). Now, let N (A) = {x ∈ Rn^ : Ax = 0}. You should check for yourself that this set, which we call kernel or nullspace of A is indeed subspace of Rn. Similary we define the left nullspace of A, to be {x ∈ Rm^ : x′A = 0}, and we notice that this is precisely N (A′). The fundamental theorem of linear algebra states:
We will not present the proof of the theorem here, but we hope you are familiar with these results. If not, you should consider taking a course in linear algebra (math 110). We can see from the theorem, that the columns of A are linearly independent iff the nullspace doesnt’ contain any vector other than zero. Similarly, rows are linearly independent iff the left nullspace doesn’t contain any vector other than zero.
We now make some remarks about solving equations of the form Ax = b, where A is a m × n matrix, x is n × 1 vector, and b is m × 1 vector, and we are trying to solve for x. First of all, it should be clear at this point that if b /∈ col(A), then the solution doesn’t exist. If b ∈ col(A), but the columns of A are not linearly independent, then the solution will not be unique. That’s because there will be many ways to combine columns of A to produce b, resulting in many possible x’s. Another way to see this is to notice that if the columns are dependent, the nullspace contains some non-trivial vector x∗, and if x is some solution to Ax = b, then x + x∗^ is also a solution. Finally we notice that if r = m > n (i.e. if the rows are linearly independent), then the columns MUST span the whole Rm, and therefore a solution exists for every b (though it may not be unique). We conclude then, that if r = m, the solution to Ax = b always exists, and if r = n, the solution (if it exists) is unique. This leads us to conclude that if n = r = m (i.e. A is full-rank square matrix), the solution always exists and is unique. The proof based on elimination techniques (which you should be familiar with) then establishes that a square matrix A is full-rank iff it is invertible. You should be able now to prove the following results:
projections, we see that we can write b ∈ Rm^ as q 1 q 1 ′b + q 2 q′ 2 b +... + qmq m′b for some orthonormal basis {q 1 , q 2 ,... , qm}.
Suppose we have a linear model, where we model some response as Yi = xi 1 β 1 + xi 2 β 2 +
... + xipβp + i, where xi 1 , xi 2 ,... , xip are the values of explanatory variables for observation i, i is the error term for observaion i that has an expected value of 0, and β 1 , β 2 ,... , βp are the coefficients we’re interested in estimating. Suppose we have n > p observations. Then writing the above system in matrix notation we have Y = Xβ + , where X is the n × p matrix of explanatory variables, Y and are n × 1 vectors of observations and errors respectively, and p × 1 β is what we’re interested in. We will furthermore assume that the columns of X are linearly independent. Since we don’t actually observe the values of the error terms, we can’t determine the value of β and have to estimate it. One estimator of β that has some nice properties (which you will learn about in statistics lectures of this camp) is βˆ that minimizes ∑^ n i=1^ (yi^ −^ xiβ)
(^2) , where xi
is the i-th row of X. We recognize that in matrix notation βˆ minimizes (Y − Xβ)′(Y − Xβ). From this point there are two (or more ways) that we can arrive at the same conclusion. First, we could recognize that the same βˆ has to minimize ‖Y − Xβ‖ (since the expresison above was just ‖Y − Xβ‖^2 , and ‖Y − Xβ‖ is always non-negative), and therefore we pick