INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR
Department of Artificial Intelligence (DoAI)
Linear Algebra for AI/ML: tutorial
Teaching Assistant: Subhasini Gupta
Tutorial
Symmetric and anti-symmetric part
An n-vector x is symmetric if xk = xn−k+1 for k = 1, . . . , n. It is anti-symmetric if xk = −xn−k+1 for k = 1, . . . , n.
(a) Show that every vector x can be uniquely decomposed as x = xs + xa , where xs is symmetric and xa is
anti-symmetric.
(b) Show that xs and xa are linear functions of x. Give matrices As and Aa such that xs = As x and xa = Aa x.
Hint: Use definitions of symmetry and anti-symmetry. Combine xk with xn−k+1 to derive unique formulas.
Express with the reverser matrix Jm and construct block matrices.
Linear functions
For each description of y, express it as y = Ax for some matrix A.
(a) yi is the difference between xi and the average of x1 , . . . , xi−1 , with y1 = x1 .
(b) yi is the difference between xi and the average of all other x j , i.e., x1 , . . . , xi−1 , xi+1 , . . . , xn .
Hint: For part (a), construct a lower-triangular A with −1/(i − 1) entries. For part (b), place 1 on diagonals
and −1/(n − 1) elsewhere.
Interpolation of polynomial values and derivatives
Let c be the 5-vector of coefficients of a quartic polynomial
p(x) = c1 + c2 x + c3 x2 + c4 x3 + c5 x4 .
Express the conditions
p(0) = 0,
p′ (0) = 0,
p(1) = 1,
p′ (1) = 0
as linear equations Ac = b. Is the system underdetermined, overdetermined, or square?
Hint: Write polynomial and derivative conditions directly in terms of ci . Collect into a matrix A and vector b.
Compare equation count to variable count.
Interpolation of rational functions
A rational function of degree two has the form
f (t) =
c1 + c2t + c3t 2
,
1 + d1t + d2t 2
with coefficients c1 , c2 , c3 , d1 , d2 . Given interpolation conditions f (ti ) = yi , i = 1, . . . , K, express them as linear
equations Aθ = b with θ = (c1 , c2 , c3 , d1 , d2 ).
Hint: Multiply both sides by denominator. Rearrange to isolate coefficients. Collect terms involving c’s and
d’s. Dimensions: A is K × 5, b is K × 1.
Page 1