Unit I – Ch 1 LA

In the following series of Blog posts, I will be giving selected solutions to previous years questions in the GATE (Graduate Aptitude Test in Engineering) – IN (Instrumentation Engineering) paper.

By “selected” I mean, I will be solving those questions which have

  1. Not been solved

  2. Incorrectly solved

  3. Inadequately solved

by madeeasy publications. I will be starting with the “GATE 2019 Instrumentation Engineering Previous Solved Papers” eighth edition – 2018 and hopefully work my way to other competitive exams.

Unit I : Engineering Mathematics

Chapter 1 : Linear Algebra

1.1) I think the below answer is more helpful.Q1.1

The madeeasy answer required us to find the rref which can be time consuming. The key here is to hone your observation skills, notice that C1+C3=2C2C_1 + C_3 = 2C_2C1+C3=2C2. If we perform the elementary column operation C2←2C2−C3−C1C_2 \leftarrow 2C_2 – C_3 – C_1C22C2C3C1 then we get one column to be 0⃗\vec 00. We can’t do any more such operations to turn either C1C_1C1 or C3C_3C3 to 0⃗\vec 00 since C1≠kC3C_1 \neq kC_3C1kC3. Thus we have column rank = 2 which is the same as the matrix rank. Option (c)(c)(c)

1.2) Incorrect answer (a) was given. (b) is correct.
Imgur
The given answer in the book (a) is wrong. The actual answer is (b). We can write the eigenvector equation Ax⃗i=λix⃗iA\vec x_i = \lambda_i \vec x_iAxi=λixi in a more compact manner using matrix notation.

An×nXn×n=Xn×nΛn×n A_{n\times n}X_{n\times n} = X_{n\times n}\Lambda_{n\times n} An×nXn×n=Xn×nΛn×n

Here stack the eigenvectors of a matrix AAA, as column vectors to form the matrix X=[x⃗1,x⃗2,⋯x⃗n]X = [\vec x_1, \vec x_2, \cdots \vec x_n ]X=[x1,x2,xn] and let the eigenvalues be used to form a diagonal matrix Λ\LambdaΛ.

Λ=X−1AX\Lambda= X^{-1}AXΛ=X1AX

So we can diagonalize AAA, if and only if there exists such an XXX, which is possible only if XXX is invertible. This is why the necessary and sufficient condition that must be true in order for AAA to be diagonalizable is that the the eigenvectors must be linearly independent. i.e. Option (b)

While the sufficient (but not necessary) condition is that all eigenvalues of AAA must be distinct. This is because, if all eigenvalues are distinct then all eigenvectors are linearly independent.

Assume x⃗i\vec x_ixi and x⃗j\vec x_jxj are linearly dependent.

ax⃗i+bx⃗j=0⃗a\vec x_i+b\vec x_j = \vec 0axi+bxj=0

Multiply AAA on both sides, use the eigenvector equation.

aAx⃗i+bAx⃗j=aλix⃗i+bλjx⃗j=0⃗aA\vec x_i +bA\vec x_j = a\lambda_i\vec x_i + b\lambda_j\vec x_j = \vec 0aAxi+bAxj=aλixi+bλjxj=0

Instead of AAA, if we multiply λi\lambda_iλi or λj\lambda_jλj we get, aλix⃗i+bλix⃗j=0⃗a\lambda_i\vec x_i+b\lambda_i\vec x_j = \vec 0aλixi+bλixj=0 and aλjx⃗i+bλjx⃗j=0⃗a\lambda_j\vec x_i+b\lambda_j\vec x_j = \vec 0aλjxi+bλjxj=0.

Subtract them to get,

bx⃗j(λj−λi)=0⃗b\vec x_j (\lambda_j – \lambda_i) = \vec 0bxj(λjλi)=0
and
ax⃗i(λi−λj)=0⃗a\vec x_i (\lambda_i – \lambda_j)= \vec 0axi(λiλj)=0

Since eigenvectors cannot be zero by definition, we can be sure that λj=λi\lambda_j = \lambda_iλj=λi. That is, all linearly dependent eigenvectors share the same eigenvalues. Thus different eigenvalues mean the corresponding eigenvectors are not linearly dependent, i.e. they are linearly independent.

Thus if we see the eigenvalues are distinct, we can be sure that the matrix AAA is diagonalizable, but not all diagonalizable matrices have distinct eigenvalues. This is why this condition is not necessary, it is just sufficient. The identity matrix is a trivial example where the eigenvectors are independent, the eigenvalues repeat and the matrix is diagonalizable.

Given below is another example,

Imgur

1.3) I feel the below answer is more intuitive.
Imgur
The equation An×nx⃗n×1=0⃗A_{n \times n}\vec x_{n\times 1} = \vec 0An×nxn×1=0 is asking, are the columns of AAA linearly independent, if so then x⃗=0⃗\vec x = \vec 0x=0 is the only solution (trivial).

If they are linearly dependent, then the unknowns that make up x⃗\vec xx are those scalars which give us 0⃗\vec 00 when we perform a weighted sum on the column vectors.

Let the column vectors of AAA be a⃗1,a⃗2,⋯,a⃗n\vec a_1, \vec a_2, \cdots, \vec a_na1,a2,,an, then the above equation can be rewritten as

x1a⃗1+x2a⃗2+⋯+xna⃗n=0⃗x_1\vec a_1 + x_2 \vec a_2 + \cdots + x_n\vec a_n = \vec 0x1a1+x2a2++xnan=0

x⃗\vec xx is restricted to 0⃗\vec 00 – the “trivial solution” if the matrix AAA is of rank nnn (which is the same as A being non singular) or all the columns are linearly independent. As the rank decreases, the scalars x1,x2,⋯,xnx_1, x_2, \cdots, x_nx1,x2,,xn are given more freedom and span larger dimensions (this is why the nullity is n−rn-rnr).

Thus for any rank other than nnn, the equation has non trivial solutions. i.e. the matrix has to be non singular. Option (a).

1.5) Often it is faster to multiply the 2×22\times22×2 matrix with each of the 4 options and observe which of the 4 options scale, rather than solve for the eigenvectors.

1.6) The solution given is too long. The ans is (C)(C)(C)
Imgur

The question itself gives us both eigenvalues and eigenvectors directly. We can immediately construct the XXX and Λ\LambdaΛ matrices and arrange them as given in my 1.2) answer.

AX=XΛ AX = X\LambdaAX=XΛ

A=XΛX−1A = X\Lambda X^{-1}A=XΛX1

We can quickly perform the inverse of a 2×22\times22×2 matrix (switch main diagonal and −1-11 times anti diagonal, whole divide by determinant) and that gives us the third term of option c.

1.9) No answer was given. The actual answer is (B)
Imgur

All vectors spanned by x⃗\vec xx and y⃗\vec yy will be in the null space of PPP.

P(ax⃗+by⃗)=aPx⃗+bPy⃗=0⃗P(a\vec x + b\vec y) = aP\vec x + bP \vec y = \vec 0P(ax+by)=aPx+bPy=0

Since the dimension of the null space is 222, Nullity =2=n−r=3−r= 2 = n – r = 3 – r=2=nr=3r

So rank of P is 111. The dimension of the range space, image space, column space is all the same as the Rank of the matrix. These terms are just synonyms.

1.11) No answer was given. The answer is (D)
Imgur

Let us observe what happens when we operate this matrix on an arbitrary 3 dimensional vector.

P[xyz]=[zxy] P \left [ \begin{matrix}
x \\
y \\
z \\
\end{matrix} \right ] =
\left [ \begin{matrix}
z \\
x \\
y \\
\end{matrix} \right ]
Pxyz=zxy

P2[xyz]=[yzx] P^2 \left [ \begin{matrix}
x \\
y \\
z \\
\end{matrix} \right ] =
\left [ \begin{matrix}
y \\
z \\
x \\
\end{matrix} \right ]
P2xyz=yzx

P3[xyz]=[xyz] P^3 \left [ \begin{matrix}
x \\
y \\
z \\
\end{matrix} \right ] =
\left [ \begin{matrix}
x \\
y \\
z \\
\end{matrix} \right ]
P3xyz=xyz

Yes, note how in each application of this matrix, the whole vector shifts down by one. x→yx \to yxy, y→zy \to zyz and zzz wraps up to xxx‘s position.

Now let this matrix P rotate x⃗\vec xx by θ\thetaθ degrees. Then P2P^2P2 would rotate x⃗\vec xx by 2θ2\theta2θ degrees and P3=IP^3 = IP3=I would rotate x⃗\vec xx by 3θ3\theta3θ degrees. We know that after 3 rotations, the vector comes back to the same position. Thus 3θ=3603\theta = 3603θ=360, so θ=120\theta = 120θ=120. Thus the answer is (D)

Alternatively, we can visualize what the matrix is doing.
Imgur
A single application of PPP is actually the rotation of all vectors in 3D space (including the basis vectors shown here) about the [1,1,1][1, 1, 1][1,1,1] vector. Such that the x axis goes and becomes the y axis, the y axis becomes the z axis and the z axis becomes the x axis.

In the first set of diagrams you can see how all 3 basis slowly move anti clockwise towards their new positions. In the second set of diagrams, we are looking towards the origin standing on the x=y=zx = y = zx=y=z line. Then this rotation will cause the basis vectors to trace a unit circle on the plane perpendicular to this line.

1.13) Only (C)(C)(C) was given as the answer.
Imgur
The correct answer is ∣X∣=0|X| = 0X=0 or ∣Y∣=0|Y| = 0Y=0. We can’t be sure both are zero. We can be sure only that both determinants cannot be non zero. So the answer is (a), (b) and (c)(c)(c).

1.18) No answer was given. Correct ans is (D)
Imgur

The system’s transfer function GGG can be related to its state space formulation using the following formula.

G(s)=C(sI−A)−1B+DG(s) = C(sI – A)^{-1}B + DG(s)=C(sIA)1B+D

Where the matrices are,

Imgur

y(t)y(t)y(t) is the output, u(t)u(t)u(t) is the input.

Using the cramer’s rule for matrix inversion,

G(s)=C×adj(sI−A)×Bdet(sI−A)+DG(s) = \frac{C\times adj(sI – A)\times B}{det(sI – A)} + DG(s)=det(sIA)C×adj(sIA)×B+D

So we can be sure that all the poles of the system will be a subset of the eigenvalues of the “A matrix”. I say subset because a few poles might get canceled out by corresponding zeros.

Since it is given that the A matrix is rank deficient, we know that det(A)=0det(A) = 0det(A)=0, i.e. the matrix is singular. We also know that product of all eigenvalues is the same as det(A)det(A)det(A), so at least one of eigenvalues need to be 000.

Thus we can be sure of at least one pole at the origin. Thus the answer is (d).

1.20) The image given in the solution is wrong.
Imgur

The actual image is,
Imgur

Note that the major or minor axes are not parallel to the x and y coordinate axes like how it is shown in the madeeasy solution.

Using Cos(A+B)=Cos(A)Cos(B)−Sin(A)Sin(B)Cos(A+B) = Cos(A)Cos(B) – Sin(A)Sin(B)Cos(A+B)=Cos(A)Cos(B)Sin(A)Sin(B) formula,

y(t)=5(cos(1000πt)2−sin(1000πt)2)y(t) = 5\left (\frac{cos(1000\pi t)}{\sqrt 2}-\frac{sin(1000\pi t)}{\sqrt 2}\right )y(t)=5(2cos(1000πt)2sin(1000πt))
⟹cos(1000πt)=2×y(t)5+x(t)3\implies cos(1000\pi t) = \frac{\sqrt 2 \times y(t)}{5} + \frac{x(t)}{3}cos(1000πt)=52×y(t)+3x(t)
y(t)2=52(cos(1000πt)2+sin(1000πt)22−2sin(1000πt)cos(1000πt)2)y(t)^2 = 5^2\left (\frac{cos(1000\pi t)^2 + sin(1000\pi t)^2}{2}-\frac{2sin(1000\pi t)cos(1000\pi t)}{2}\right )y(t)2=52(2cos(1000πt)2+sin(1000πt)222sin(1000πt)cos(1000πt))
2y(t)225=1−2x(t)3(2×y(t)5+x(t)3)\frac{2y(t)^2}{25} = 1 – 2\frac{x(t)}{3}\left (\frac{\sqrt 2 \times y(t)}{5} + \frac{x(t)}{3} \right )252y(t)2=123x(t)(52×y(t)+3x(t))

The explicit equation is thus,

2×29+2y225+22xy15−1\frac{2x^2}{9}+\frac{2y^2}{25}+\frac{2\sqrt 2xy}{15}- 192x2+252y2+1522xy1

Given an arbitrary conic section in the form Ax2+Bxy+Cy2+Dx+Ey+F=0Ax^2+Bxy+Cy^2+Dx+Ey+F=0Ax2+Bxy+Cy2+Dx+Ey+F=0

If B2<4ACB^2 < 4ACB2<4AC then the conic section is an ellipse.

Note that since 2>12>12>1, we can be sure the XY plot is an ellipse.

8152<4.2.29.25\frac{8}{15^2}<\frac{4.2.2}{9.25}1528<9.254.2.2

115<23.5\frac{1}{15}<\frac{2}{3.5}151<3.52

1.21) No solution is given, correct ans is (c)(c)(c)
Imgur

We can extend the idea of differentiation to matrices and vectors quite naturally to get the following formula,

Imgur

I will reproduce the proof I have already provided here,

First consider the two ways a unknown vector can be dotted with a scalar vector to get a scalar kkk.

k=x⃗Ta⃗=a⃗Tx⃗=[x1a1+x2a2+…+xnan]1×1k = \vec x^T\vec a = \vec a^T\vec x = [x_1a_1 +x_2a_2 + … + x_na_n]_{1\times 1}k=xTa=aTx=[x1a1+x2a2+...+xnan]1×1

Define the derivative of scalar w.r.t to a vector in most natural manner possible.

dkdx⃗=[dkdx1,dkdx2,⋯,dkdxn]=a⃗1×nT\frac{dk}{d\vec x} = \left [\frac{dk}{dx_1}, \frac{dk}{dx_2}, \cdots, \frac{dk}{dx_n} \right ] = \vec a^T_{1 \times n}dxdk=[dx1dk,dx2dk,,dxndk]=a1×nT

Now using the above, apply it to find the gradient/derivative of x⃗TAx⃗\vec x^TA\vec xxTAx. Apply product rule, note that the terms in the bracket are considered as constants when differentiating.
d(x⃗TAx⃗)dx⃗=d((x⃗TA)1×nx⃗n×1)dx⃗+d(x⃗T(Ax⃗))dx⃗\frac{d(\vec x^TA\vec x)}{d\vec x} = \frac{d((\vec x^TA)_{1\times n}\vec x_{n \times 1})}{d\vec x} + \frac{d(\vec x^T(A\vec x))}{d\vec x}dxd(xTAx)=dxd((xTA)1×nxn×1)+dxd(xT(Ax))

Note how x⃗TA\vec x^TAxTA and Ax⃗A\vec xAx can now be treated as a scalar vector and apply the above formula for derivative of scalar w.r.t to vector.

d(x⃗TAx⃗)dx⃗=(x⃗TA)+(Ax⃗)T=x⃗T(A+AT)\frac{d(\vec x^TA\vec x)}{d\vec x} = (\vec x^TA) + (A\vec x)^T = \vec x^T(A+A^T)dxd(xTAx)=(xTA)+(Ax)T=xT(A+AT)


Here we can better understand the product rule at work, if we elaborate what is happening there, let AAA be thought of as having r⃗1,⋯,r⃗n\vec r_1, \cdots, \vec r_nr1,,rn as the row vectors, each of size 1×n1 \times n1×n or being made of c⃗1,⋯,c⃗n\vec c_1, \cdots, \vec c_nc1,,cn as column vectors, each of size n×1n \times 1n×1.

x⃗TAx⃗=[x1x2⋯xn][r⃗1r⃗2⋯r⃗n]n×n[x1x2⋯xn] \vec x^TA\vec x = \left [ \begin{matrix}
x_1 & x_2 & \cdots & x_n \\
\end{matrix} \right ] \left [ \begin{matrix}
\vec r_1 \\
\vec r_2 \\
\cdots \\
\vec r_n \\
\end{matrix} \right ]_{n\times n}
\left [ \begin{matrix}
x_1 \\
x_2 \\
\cdots \\
x_n \\
\end{matrix} \right ]
xTAx=[x1x2xn]r1r2rnn×nx1x2xn

From this we can multiple either x⃗T\vec x^TxT to AAA first or AAA to xxx first, giving us 2 ways of seeing this scalar quantity,

=[∑i=1nxir⃗i]1×nx⃗n×1=x⃗1×nT[∑i=1nxic⃗i]n×1= \left [ \sum_{i=1}^n x_i\vec r_i \right ]_{1 \times n} \vec x_{n \times 1} = \vec x^T_{1 \times n} \left [ \sum_{i=1}^n x_i\vec c_i \right ]_{n \times 1} =[i=1nxiri]1×nxn×1=x1×nT[i=1nxici]n×1

Thus we see how the two terms of AAA and ATA^TAT appear, since in one term we have the rows and in the other we have the columns.

Now, applying these formulas to differentiating f(x)f(x)f(x) and equating to 0⃗\vec 00 we can find extrema of fff. Note that AAA is a symmetric matrix, so AT=AA^T = AAT=A.

f′(x⃗)=x⃗T(AT+A)+b⃗T+0⃗=2x⃗TA+b⃗Tf'(\vec x) = \vec x^T(A^T+A) + \vec b^T + \vec 0 = 2\vec x^TA + \vec b^Tf(x)=xT(AT+A)+bT+0=2xTA+bT

f′(x⃗0)=2x⃗0TA+b⃗T=0⃗1×nf'(\vec x_0) = 2\vec x_0^TA + \vec b^T = \vec 0_{1\times n}f(x0)=2x0TA+bT=01×n

x⃗0=(−bTA−12)T=−(AT)−1b2=−A−1b2\vec x_0 =\left ( \frac{-b^TA^{-1}}{2}\right )^T = -\frac{(A^T)^{-1}b}{2} = -\frac{A^{-1}b}{2}x0=(2bTA1)T=2(AT)1b=2A1b

Only one extrema has been found and (c)(c)(c) must be the answer. But to check if this is a minima or maxima, since this is a function of more than one variable, the second derivative test generalizes to a test based on the eigenvalues of the function’s Hessian matrix at the critical point (where first derivative vanishes). The Hessian is also the Jacobian of the gradient of fff, the first derivative we calculated just now is also called the gradient of fff.

H(f(x))=J(∇f(x))T=J(2x⃗TA)T\mathbf{H}(f(\mathbf{x})) = \mathbf{J}(∇f(\mathbf{x}))^T = \mathbf{J}(2\vec x^TA)^TH(f(x))=J(f(x))T=J(2xTA)T
H(f(x))=J(2[∑i=1nxir⃗i]1×n)T\mathbf{H}(f(\mathbf{x})) =\mathbf{J}\left (2\left [ \sum_{i=1}^n x_i\vec r_i \right ]_{1 \times n} \right )^TH(f(x))=J(2[i=1nxiri]1×n)T

Differential of a vector function y⃗=g(x⃗)\vec y = g(\vec x)y=g(x) with respect to a vector x⃗\vec xx is known as the pushforward (or differential), or the Jacobian matrix.
Imgur

H(f(x0))=[2r⃗12r⃗2⋯2r⃗n]=2AT=2A\mathbf{H}(f(\mathbf{x_0})) = \left [ \begin{matrix}
2\vec r_1 \\
2\vec r_2 \\
\cdots \\
2\vec r_n \\
\end{matrix} \right ] = 2A^T = 2A
H(f(x0))=2r12r22rn=2AT=2A

Note that since AAA is positive definite, the eigenvalues of AAA are all positive and thus the eigenvalues of the Hessian at x0x_0x0 are all positive, thus x0x_0x0 is a local minimum.

1.22) The matrix AAA given in the solution is wrong.
Imgur

AX=YAX = YAX=Y
The madeeasy solution tried to invert XXX which is not possible. XXX is a singular matrix. The given matrix AAA in the madeeasy solution is also wrong. It is easy to confirm this by substitution.

We can find the A matrix without any calculation if we note that what A is doing is simply switching the 2nd row with the 3rd row. So we can construct the matrix AAA,

The first row of AAA selects the first row of XXX, so we know it must be [1,0,0][1, 0, 0][1,0,0].

The second row of AAA selects the third row of XXX, so we know it must be [0,0,1][0, 0, 1][0,0,1].

Finally, the third row of AAA selects the second row of XXX, so we know it must be [0,1,0][0, 1, 0][0,1,0].

Thus the matrix AAA is,
[100001010]
\left [ \begin{matrix}
1 & 0 & 0 \\
0 & 0 & 1 \\
0 & 1 & 0 \\
\end{matrix} \right ]
100001010

The eigenvalue equation is ∣A−Iλ∣=0|A-I\lambda| =0AIλ=0 or

(1−λ)((−λ)2−1)=0(1-\lambda)((-\lambda)^2-1) = 0(1λ)((λ)21)=0

Thus the eigenvalues are 1, 1 and -1

1.26) There exists a faster solution
Imgur
Note that trace of the matrix is 11, so the sum of eigenvalues must also be 11. Thus answer must be (c)(c)(c) or (d)(d)(d).
The elementary operation R3←R3−−65R2R_3 \leftarrow R_3 – \frac{-6}{5}R_2R3R356R2 will create the rref of the matrix A. At this point the product of the diagonal elements will be equal to the product of the eigenvalues.
∏i=13λi=1×5×(5+625)\prod_{i=1}^3 \lambda_i = 1 \times 5 \times \left (5+\frac{6^2}{5} \right )i=13λi=1×5×(5+562)

Which makes it clear it is not (d)(d)(d) in which case we should have seen 252525. It is (c)(c)(c).

1.27) There exists a faster solution
Imgur

Note that every point [x y]T[x \space y]^T[x y]T becomes [x −y]T[x \space -y]^T[x y]T. The distance along the x axis does not change. the image just flips along the x axis. However far it used to be in the positive direction of y, it now is equally far in the negative direction of y.

It is obviously the matrix given in option (d)(d)(d) which preserves the x coordinate but flips the y coordinate.

Written with StackEdit.