T&S Book
T&S Book
Trebin Mathew
Sathyajith M
Contents
1 Linear functions 3
3 Matrices 7
3.1 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2
Chapter 1
Linear functions
In this chapter we introduce linear and affine functions, and describe some com-
mon settings where they arise, including regression models.
f (x) = f (x1 , x2 , . . . , xn )
3
4 CHAPTER 1. LINEAR FUNCTIONS
f (x) = aT x = a1 x1 + a2 x2 + · · · + an xn (2.1)
for any n-vector x.This function gives the inner product of its n -vector argument
x with some (fixed) n vector a.We can also think of f as forming a weighted
sum of the elements of x;the elements of a give the weights used in forming the
weighted sum.
Superposition and linearity. The inner product function f defined in (2.1)
satifies the property .
for all n-vectors x, y, and all scalars α, β. This property is called superposition.A
function that satisfies the superposition property is called linear.We have just
shown that the inner product with a fixed vector is a linear function.
The superposition equality
2.1 Norm
The Euclidean norm of an n- vector x (named after the Greek mathematician
Euclid) denoted by ||x||,is the squareroot of the sum of the squares of the ele-
ments,
q
||x|| = x21 + x22 + · · · + x2n
5
6 CHAPTER 2. NORM AND DISTANCE
is a large number. (The numerical values of the norm that qualify for small or
large depend on the particular application and context.)
Chapter 3
Matrices
3.1 Matrices
A matrix is a rectangular array of numbers written between rectangular brack-
ets,as in
0 1 2.3 −0.1
1.3 4 −0.1 0
4.1 −1 0.4 1.7
It is also common to use large parentheses instead of rectangular brackets, as in
0 1 2.3 −0.1
1.3 4 −0.1 0
4.1 −1 0.4 1.7
An important attribute of a matrix is its size or dimensions, i.e, the numbers
of rows and columns. The matrix above has 3 rows and 4 columns, so its size is
3 × 4.A matrix of size m × n is called an m × nmatrix.
The elements (or entries or coefficients) of a matrix are the values in the
array. The i, j element is the value in the ith row and jth column, denoted
by double subscripts: the i, j element of a matrix A is denoted Aij (or Ai,j ,
when i or j is more than one digit or character). The positive integers i and
j are called the (row and column) indices. If A is an m × n matrix, then the
row index i runs from 1 to m and the column index j runs from 1 to n. Row
indices go from top to bottom, so row 1 is the top row and row m is the bottom
row. Column indices go from left to right , so column 1 is the left column and
column n is the right column.
If the matrix above is B, then we have B13 = -2.3, B32 = -1. The row index
of the bottom left element (which has value 4.1) is 3; its column index is 1.
7
8 CHAPTER 3. MATRICES
Two matrices are equal if they have the same size, and the corresponding
entries are all equal. As with vectors, we normally deal with matrices with
entries that