Transformations and forms in MATLAB — exercises to build matrices column by column, draw a distorted sticker and classify forms with Sylvester (and the transpose from lab assignment 4)
In lab assignment 4 of AG (Linear Algebra and Geometry), the question worth the most (2.5 points) asked for the matrix of a transformation in another basis, and the answer I gave was the transpose of the right one. The arithmetic was fine; the images were in rows instead of columns. In this article the matrix is built by a function of yours, column by column, so that mistake can no longer slip in.
Table of Contents
How to use this article
I won’t explain the algebra again: the matrix of a linear map, diagonalisation and quadratic forms are in Linear transformations and diagonalisation and Bilinear and quadratic forms. Here you program: functions that take other functions (@(v) …), matrices built with loops, checks with norm and, for the first time in the intensive course, plots with plot and fill. The commands are in the theory of this block, MATLAB intensive 3: transformations and forms.
The example is a sticker editor: a simple drawing (a little house) that is rotated, stretched and sheared with 2 × 2 matrices, as photo apps do when you drag a corner.
- Level 1 (reproduce): rotations, scalings and shears applied to the sticker, with what comes out.
- Level 2 (write the function):
matrix_of, which builds the matrix of any transformation, andsylvester, which classifies a quadratic form. - Level 3 (full lab assignment): the whole editor, with a plot, powers and a classification, step by step and with quiz questions.
- Folded solutions; then “What is wrong here?” and the code-reading quiz.
All the code was run once with the interpreter of the website’s MATLAB environment, which gives the same outputs as MATLAB R2025a. The plots in this article are drawn with the data that those same commands produce.
Level 1: rotating, stretching and shearing the sticker
The sticker is a little house with five vertices. Their coordinates go in the columns of a matrix (the first vertex is repeated at the end to close the drawing):
house = [0 2 2 1 0 0; 0 0 2 3 2 0];
Exercise 1. a) Write the matrix R of a 90° rotation (with cosd and sind), the matrix of a scaling E that doubles the width and keeps the height, and the matrix of a horizontal shear C that moves each point half a unit to the right for each unit of height. b) Apply each one to the sticker with a single multiplication. Where does the roof (the vertex ) end up in each case? c) Compute det of the three matrices and say what happens to the sticker’s area. d) Is R*E the same as E*R? Check it with a command that gives 1 if they are equal.
Expected result: the roof goes to with the rotation, to with the scaling and to with the shear; the determinants are 1, 2 and 1 (the area is kept, doubled and kept); R*E and E*R are not equal.
A transformation matrix has in each column the image of a basis vector: the first column is where goes and the second, where goes. And multiplying R*house transforms every vertex at once, because each column of house is a point.
Level 2: matrices built by a function
Exercise 2. a) Write A = matrix_of(f, n), which takes a function f (an anonymous function that transforms a column vector of ) and returns its matrix in the standard basis, built column by column with a loop. Test it with the shear f = @(v) [v(1) + 0.5*v(2); v(2)]. b) Write t = sylvester(A), which classifies the quadratic form of a symmetric matrix A: positive or negative definite with the leading principal minors (Sylvester’s criterion) and, if the criterion doesn’t decide, semidefinite or indefinite with the signs of the eigenvalues. Test it with , and .
Expected result: matrix_of gives ; the three forms are positive definite, indefinite and positive semidefinite.
The columns of eye(n) are the vectors of the standard basis: I(:, j) is . For the minors, det(A(1:k, 1:k)) with k from 1 to n. And look at the second matrix: its first minor is 0, so Sylvester can say nothing and you have to look at the eigenvalues.
Level 3: a full lab assignment
Shaped like the lab assignment guides on the campus: one part, one command or a short answer. Use matrix_of and sylvester.
Exercise 3. The sticker editor. The app has a “tilt and stretch” effect that takes each point to .
- a) Write the effect as an anonymous function
fand get its matrixAwithmatrix_of. How much does it multiply the area by? - b) Apply the effect to the house and draw in the same figure the original sticker with a dashed line and the transformed one filled in, with both axes at the same scale.
- c) The effect can be applied several times. Diagonalise
Awith[P, D] = eig(A), check the diagonalisation with a command that gives an almost-zero number, and compute in two ways: withA^5and with . - d) The app measures how much a vector is distorted with . Classify that form with
sylvesterand say whether some (non-zero) vector is not distorted at all. - e) Quiz questions: (1) True or false: the first column of
Ais the image of . (2) Fill in: afterplot, so that the next drawing doesn’t erase the previous one, you type ___. (3) What eigenvalue does the direction have and what happens to the sticker in that direction?
Expected result: , which multiplies the area by 3; eigenvalues 1 and 3, with ; the form in d) is positive semidefinite, and the vectors in the direction aren’t distorted.
In b), first fill with the new sticker, then hold on and then plot with the original and 'k--'. In d), is symmetric: call sylvester(A - eye(2)).
What is wrong here?
Snippet 1: the matrix by rows (my lab assignment 4)
f = @(v) [v(1) + 0.5*v(2); v(2)]; I = eye(2); A = [f(I(:,1))'; f(I(:,2))'] A * [0; 2] f([0; 2])
Output:
A =
1.0000 0
0.5000 1.0000
ans =
0
2
ans =
1
2
The images of and have been put in as rows (with the ' and the ;), and the matrix you get is the transpose. The proof is immediate: A*[0; 2] and f([0; 2]) should match and they don’t. This is exactly the mistake from my lab assignment.
The picture shows the two ways of placing the images of the basis, the right one and the one from my assignment:
Writing the images of the basis one below the other because “they read better like that”. In the matrix of a transformation they go in columns. The one-line check (A*v against f(v) with any vector) always catches it.
A = [f(I(:,1)), f(I(:,2))] A * [0; 2]
Output:
A =
1.0000 0.5000
0 1.0000
ans =
1
2
Snippet 2: the diagonalisation the wrong way round
A = [2 1; 1 2]; [P, D] = eig(A); B = inv(P) * D * P; norm(B - A)
Output:
ans =
0
Here it gives 0 by chance: this P is symmetric and orthogonal, so and both formulas, and , are the same computation. With another matrix that doesn’t happen:
A = [4 -2; 1 1]; [P, D] = eig(A); norm(inv(P) * D * P - A) norm(P * D * inv(P) - A)
Output:
ans =
3.5811
ans =
0
The right one is (from ): first you move to the eigenvector basis with , stretch with and come back with , reading from right to left.
Don’t memorise the order: check norm(A*P - P*D), which needs no inverse. If it comes out almost zero, P and D match.
Snippet 3: the hasty Sylvester
function t = sylvester_bad(A)
m1 = A(1,1); m2 = det(A);
if m1 > 0 && m2 > 0
t = 'positive definite';
elseif m1 < 0 && m2 > 0
t = 'negative definite';
else
t = 'semidefinite';
end
end
sylvester_bad([0 1; 1 0])
Output:
ans =
'semidefinite'
The form gives and : it is indefinite. The function has put into “semidefinite” everything that isn’t definite, and with minors that don’t decide (here ) Sylvester says nothing: you have to look at the eigenvalues.
Believing Sylvester’s criterion classifies everything. It only decides “positive definite” and “negative definite”. If it fails, the answer comes from the eigenvalues (or from two vectors with different signs).
Solutions
Exercise 1
Before you open the solution, the approach. To get any of the three matrices you only need two questions: where does go and where does go? Each answer is a column. In the shear, the wording of the exercise already tells you if you translate it: “half a unit to the right for each unit of height” means adding half of to , without changing the height. And in b) don’t go vertex by vertex: house stores one vertex in each column, so a single multiplication transforms them all.
Show the solution to exercise 1
R = [cosd(90) -sind(90); sind(90) cosd(90)] E = [2 0; 0 1]; C = [1 0.5; 0 1]; roof = [1; 3]; R*roof, E*roof, C*roof det(R), det(E), det(C) isequal(R*E, E*R)
Output:
R =
0 -1
1 0
ans =
-3
1
ans =
2
3
ans =
2.5000
3.0000
ans =
1
ans =
2
ans =
1
ans =
logical
0
a) In the scaling, and : those are its columns. In the shear, doesn’t move (height 0) and . The rotation comes out with integers because cosd(90) is exactly 0 (with cos(pi/2) you would get ).
b) The roof: , and . For the whole sticker R*house is enough: each column of house is a vertex and each column of the result, its image.
c) The determinants are 1, 2 and 1: the rotation and the shear keep the area and the scaling doubles it. The absolute value of the determinant is the area factor.
d) isequal gives 0. Stretching and then rotating isn’t the same as rotating and then stretching: matrix multiplication isn’t commutative, and here you can see it in the drawing.
Why it is done this way: cosd/sind are used because an editor’s angles are in degrees; and isequal because here all the arithmetic uses exact numbers (0, 1, 2, 0.5). With real decimals you’d have to compare with a tolerance, as in block 2.
Why R*E and E*R don’t give the same thing, following only the roof. R*E*roof is read from right to left: the matrix next to the vector is E, so it acts first.
| Order | First step | Second step | Why |
|---|---|---|---|
R*E | E: | R: | The width is stretched and then it is rotated |
E*R | R: | E: | It is rotated first, so what gets stretched is the height, now lying on its side |
It isn’t rounding: they are two different transformations.
R = [0 -1; 1 0]; E = [2 0; 0 1]; roof = [1; 3]; R * (E * roof) E * (R * roof)
Output:
ans =
-3
2
ans =
-6
1
Reading R*E as “R first”. In R*E*v, the one next to v is E, and it is the one that acts first.
And in c), why the determinant and not measuring the house before and after: the square formed by and becomes the parallelogram formed by the two columns. With the scaling it is a 2 by 1 rectangle (area 2); with the shear, a parallelogram that leans but is just as tall (area 1). Whatever happens to that square happens to any piece of the sticker.
Exercise 2
Before you open the solution, the approach. matrix_of does with a loop the same thing you did by hand in exercise 1: is I(:, j), its image is f(I(:, j)) and it goes into column . In sylvester, what matters is the order: first the minors, which can only say “positive definite” or “negative definite”, and when they say it, it is certain. If they say neither, you still know nothing: it is time to look at the eigenvalues. The mistake in snippet 3 is skipping that step.
Show the solution to exercise 2
function A = matrix_of(f, n)
% Matrix of the transformation f in the standard basis of R^n:
% column j is the image of e_j.
A = zeros(n);
I = eye(n);
for j = 1:n
A(:, j) = f(I(:, j));
end
end
function t = sylvester(A)
% Classifies the quadratic form of the symmetric matrix A.
n = size(A, 1);
m = zeros(1, n);
for k = 1:n
m(k) = det(A(1:k, 1:k)); % leading principal minors
end
if all(m > 0)
t = 'positive definite';
elseif all(m(1:2:end) < 0) && all(m(2:2:end) > 0)
t = 'negative definite'; % alternating signs, starting with -
else % Sylvester doesn't decide: eigenvalues
l = eig(A);
if all(l >= -1e-10)
t = 'positive semidefinite';
elseif all(l <= 1e-10)
t = 'negative semidefinite';
else
t = 'indefinite';
end
end
end
C = matrix_of(@(v) [v(1) + 0.5*v(2); v(2)], 2) sylvester([2 -1; -1 3]) sylvester([0 1; 1 0]) sylvester([1 2; 2 4])
Output:
C =
1.0000 0.5000
0 1.0000
ans =
'positive definite'
ans =
'indefinite'
ans =
'positive semidefinite'
The first form has minors 2 and 5, both positive. The second is the one from snippet 3: eigenvalues and , indefinite. The third has minors 1 and 0: Sylvester doesn’t decide, and the eigenvalues (0 and 5) say positive semidefinite; the vectors in the direction give .
Why it is done this way:
matrix_oftakes a function as an argument. That way it works for any linear transformation: today’s shear, a rotation, or the from the quiz.m(1:2:end) < 0andm(2:2:end) > 0take the odd and even minors separately: negative definite is , , …- The eigenvalues are compared with a tolerance (
>= -1e-10): an eigenvalue that should be 0 can come out as and turn a semidefinite form into an indefinite one.
How I would mark it (rough breakdown, my own):
| What is assessed | Points |
|---|---|
matrix_of with the image of in column | 1.5 |
| Leading principal minors with a loop | 1 |
| Positive and negative definite told apart properly | 1 |
| Undecided cases with eigenvalues and a tolerance | 1.5 |
The three tests of sylvester, decision by decision:
| Matrix | Minors | Do they decide? | Eigenvalues | Result | Why |
|---|---|---|---|---|---|
[2 -1; -1 3] | 2 and 5 | Yes | Not needed | positive definite | Both minors are positive |
[0 1; 1 0] | 0 and −1 | No | −1 and 1 | indefinite | A 0 is neither positive nor negative; there is one eigenvalue of each sign |
[1 2; 2 4] | 1 and 0 | No | 0 and 5 | positive semidefinite | None negative, but one is 0 |
Why not go straight to the eigenvalues, which decide everything? You’d get the same result, but the exercise asks for Sylvester and the function follows the order you would follow on paper: the minors of a are three determinants; the eigenvalues, the roots of a degree-3 polynomial. Cheap things first.
Exercise 3
Show the solution to exercise 3
a)
f = @(v) [2*v(1) + v(2); v(1) + 2*v(2)]; A = matrix_of(f, 2) det(A)
Output:
A =
2 1
1 2
ans =
3
The area is multiplied by 3.
b)
house = [0 2 2 1 0 0; 0 0 2 3 2 0];
N = A * house;
fill(N(1,:), N(2,:), 'r')
hold on
plot(house(1,:), house(2,:), 'k--')
axis equal
title('Tilt and stretch')
Plotting commands don’t write anything in the Command Window: they open a figure. This is the one you get:
fill fills the polygon formed by the points in order (that is why the first vertex is repeated at the end), hold on makes the next plot draw on top instead of replacing it, and axis equal puts the same scale on both axes: without it, a square would look like a rectangle and you wouldn’t see the real distortion.
c)
[P, D] = eig(A) norm(A*P - P*D) A^5 P * D^5 / P
Output:
P =
-0.7071 0.7071
0.7071 0.7071
D =
1 0
0 3
ans =
0
ans =
122 121
121 122
ans =
122.0000 121.0000
121.0000 122.0000
Eigenvalues 1 and 3. norm(A*P - P*D) gives 0: correct diagonalisation. The two ways of computing agree; the second comes out with decimals (122.0000) because it goes through the division by P, which has in all its entries. P*D^5/P is : the slash / divides on the right, like *inv(P) but with less error.
d)
sylvester(A - eye(2)) null(A - eye(2), 'r')
Output:
ans =
'positive semidefinite'
ans =
-1
1
: positive semidefinite. Its kernel is the direction , that is, the direction of : the vectors in that direction are eigenvectors with eigenvalue 1, the effect doesn’t change them and their “distortion” is 0.
e) (1) True: column is the image of . (2) hold on. (3) The direction is that of eigenvalue 3: the sticker is stretched three times along that diagonal, and along the other one, , it stays the same. That is why the house gets longer diagonally.
Why it is done this way: in c) the check is norm(A*P - P*D) and not a comparison with inv(P)*D*P: that way you don’t depend on remembering the order (snippet 2). And in d) null(·, 'r') answers “is any vector undistorted?” with a basis of those vectors, not with a yes or a no.
The approach to c), in words. Why diagonalise if A^5 is a single command? Because with the diagonal the power doesn’t multiply matrices: and . And that lets you predict the result: the direction is multiplied by 3 on each application and stays the same.
A = [2 1; 1 2]; A * [1; 1] A * [1; -1] [3^5 + 1, 3^5 - 1] / 2
Output:
ans =
3
3
ans =
1
-1
ans =
122 121
The last line is the first column of by hand: since , five applications take it to .
In d), you can read the form without the function: with , . A square is never negative and is 0 exactly when : positive semidefinite, with the direction undistorted. It fits with c): subtracting takes away each vector’s copy of itself, so only the vectors that leaves unchanged, the ones with eigenvalue 1, give 0.
Quiz: read the code
Ten code-reading questions, like the ones in the lab assignment quizzes on the campus. Every output was checked with the interpreter.
What does this code print?
f = @(v) [3*v(1); v(1) + v(2)]; I = eye(2); A = [f(I(:,1)), f(I(:,2))]
- A = [3 0; 1 1]
- A = [3 1; 0 1]
- A = [3 0; 0 1]
- An error: you can’t join two functions
Solution
Answer: A = [3 0; 1 1]
Each f(I(:,j)) is a column vector and the comma puts them side by side: column j is the image of .
What does this code print?
P = [0 2 2 0; 0 0 1 1]; A = [1 0; 0 3]; Q = A * P; Q(:, 3)
- ans = [2; 3]
- ans = [6; 1]
- ans = [2; 1]
- ans = [0 3 3 0]
Solution
Answer: ans = [2; 3]
Each column of P is a point and A*P transforms them all at once. Q(:, 3) is the image of the third one.
If [P, D] = eig(A), which command should give an almost-zero number?
- norm(A*P – P*D)
- norm(A*P – D*P)
- norm(inv(P)*D*P – A)
- norm(A – D)
Solution
Answer: norm(A*P – P*D)
Each column of is and each column of is . Them being equal is the definition of an eigenvector.
What does this code print?
A = [1 2; 2 1]; m = [A(1,1), det(A)]
- m = [1 -3]
- m = [1 3]
- m = [1 2]
- m = [2 -3]
Solution
Answer: m = [1 -3]
With minors 1 and −3 Sylvester doesn’t give definite (positive or negative): the eigenvalues 3 and −1 say it is indefinite.
About the article’s sylvester function:
- If all the leading principal minors are positive, it returns positive definite.
- If a leading principal minor is 0, the form is certainly semidefinite.
- To decide between semidefinite and indefinite it uses the eigenvalues.
- It works the same with matrices that aren’t symmetric.
Solution
- T — If all the leading principal minors are positive, it returns positive definite.
- F — If a leading principal minor is 0, the form is certainly semidefinite.
- T — To decide between semidefinite and indefinite it uses the eigenvalues.
- F — It works the same with matrices that aren’t symmetric.
With a minor equal to 0 it can be semidefinite or indefinite ( is indefinite). The matrix of a quadratic form is taken symmetric.
Complete it to draw the filled polygon and, on top, the dashed original, with both axes at the same scale:
fill(N(1,:), N(2,:), ‘r’); ____; plot(P(1,:), P(2,:), ‘k–‘); axis ____
Words:
- equal
- square
- tight
- hold off
- hold on
Solution
fill(N(1,:), N(2,:), ‘r’); hold on; plot(P(1,:), P(2,:), ‘k–‘); axis equal
hold on makes the next drawing add on; axis equal matches the scales, so angles and proportions look as they really are.
What does this code print?
R = [cosd(90) -sind(90); sind(90) cosd(90)]; det(R)
- ans = 1
- ans = -1
- ans = 0
- ans = 90
Solution
Answer: ans = 1
for any angle: rotations don’t change the area.
What does this code print?
l = [3; 1; 2]; [s, o] = sort(l); o'
- ans = 2 3 1
- ans = 1 2 3
- ans = 3 1 2
- ans = 3 2 1
Solution
Answer: ans = 2 3 1
The second output of sort are the original positions in the new order. With P(:, o) you reorder the eigenvectors like the eigenvalues.
What does this code print?
A = [2 0; 0 3]; P = eye(2); D = A; isequal(P*D^3/P, A^3)
- ans = logical 1
- ans = logical 0
- ans = [8 0; 0 27]
- An error: you can’t divide by a matrix
Solution
Answer: ans = logical 1
A diagonal matrix is already diagonalised: its eigenvectors are the standard basis.
With the article’s matrix_of function, what does matrix_of(@(v) 2*v, 3) return?
- 2*eye(3)
- [2 2 2]
- 2
- eye(3)
Solution
Answer: 2*eye(3)
A scaling by 2: the image of is and the matrix is .
Try it in the MATLAB environment
Open the MATLAB environment, paste exercise 3 and, at the end, matrix_of and sylvester. Then:
- Change the effect to a 30° rotation with
f = @(v) [cosd(30)*v(1) - sind(30)*v(2); sind(30)*v(1) + cosd(30)*v(2)]and see whateigsays: the eigenvalues come out complex, because a rotation leaves no direction fixed. - Call
sylvesterwith-eye(3)and withdiag([1 0 -1]). - Write your own effect that turns the house into its reflection in a vertical mirror. What is its determinant?
- Run part b) in the environment: the figure appears in the Command Window, below the outputs. Compare it with the one in the article and try removing
axis equalto see the house get squashed.
For your lab assignments
Lab assignment 4 on the campus asks for the matrix of a transformation in different bases, the kernel and the image, and the eigenvectors in order. This model script does all of that; change only the function f and the bases.
%% Linear transformation: template for lab assignment 4
format short
f = @(v) [2*v(1) + v(2); v(2) + v(3); 3*v(3)]; % R^3 -> R^3
Bv = [1 0 1; 1 1 0; 0 1 1]; % new basis (in columns)
%% 1. Matrix in the standard basis, by columns
A = matrix_of(f, 3)
%% 2. Matrix in the new basis: A' = Bv^(-1) * A * Bv
format rat
An = Bv \ A * Bv
format short
%% 3. Kernel and image
kernel = null(A, 'r')
r = rank(A)
%% 4. Eigenvalues from smallest to largest, with their eigenvectors in that order
[P, D] = eig(A);
[l, order] = sort(real(diag(D)));
l
P = P(:, order)
%% ---- functions (always at the end) ----
function A = matrix_of(f, n)
A = zeros(n); I = eye(n);
for j = 1:n
A(:, j) = f(I(:, j)); % image of e_j in column j
end
end
Output:
A =
2 1 0
0 1 1
0 0 3
An =
2 0 0
-1 2 1
1 1 2
kernel =
3×0 empty double matrix
r =
3
l =
1
2
3
P =
-0.7071 1.0000 0.4082
0.7071 0 0.4082
0 0 0.8165
What it saves you in the quiz:
- Never the transpose:
matrix_ofputs each image in its column. If you’re given the transformation as a formula, turn it intofand let the function build the matrix. Bv \ A * Bvis without typinginv. Withformat ratit comes out with the fractions the quiz asks for.- Empty kernel: if
nullreturns a3×0 emptymatrix, the kernel is just the zero vector and the transformation is injective (here, rank 3). - Sorting eigenvalues:
eigdoesn’t promise any order.sortreturns the order in its second output, andP(:, order)moves the columns ofPat the same time: the eigenvector follows its eigenvalue.
What next?
If anonymous functions or hold on were hard, go back to the theory of this block, MATLAB intensive 3: transformations and forms. And the Plane transformations simulator distorts the grid with the matrix you type: try the A from exercise 3 and you’ll see the two directions that don’t rotate.
Cheat sheet: transformations and forms in MATLAB
The essentials in 30 seconds: the matrix of a transformation has the image of in column ; a drawing is points in the columns of a matrix, and transforming it is one multiplication; a diagonalisation is checked with norm(A*P - P*D); Sylvester only decides the definite cases, the rest is decided by the eigenvalues.
| I want… | Code | Watch out |
|---|---|---|
| A transformation as a function | f = @(v) [2*v(1) + v(2); v(2)] | Returns a column vector |
| Its matrix | A(:, j) = f(I(:, j)) in a loop | Columns, not rows |
| Rotation by degrees | [cosd(t) -sind(t); sind(t) cosd(t)] | cosd for degrees |
| Transform a drawing | N = A * points | One point per column |
| Area factor | abs(det(A)) | Negative = reflection |
| Diagonalise | [P, D] = eig(A) | P and D go together |
| Check | norm(A*P - P*D) | Almost zero |
| Powers | A^n or P*D^n/P | /P is *inv(P) |
| Leading principal minors | det(A(1:k, 1:k)) | k = 1:n |
| Draw | fill(x, y, 'r'), hold on, plot(x, y, 'k--'), axis equal | First point repeated at the end |
| Sort eigenvalues | [l, o] = sort(diag(D)); P = P(:, o) | Move P in the same order |
Templates for the exercises:
- Matrix of a transformation: formula → anonymous function →
matrix_of→ checkA*vagainstf(v). - Drawing: points in columns with the first one repeated →
N = A*points→fillthe new one →hold on→plotthe original →axis equal. - Classify a form: symmetric matrix → minors → if they don’t decide, eigenvalues with a tolerance.
| Symptom | Likely cause |
|---|---|
A*v doesn’t match f(v) | Transposed matrix: images in rows |
norm(inv(P)*D*P - A) large | Wrong order: it is P*D/P |
The second plot erases the first | hold on is missing |
| The drawing comes out squashed | axis equal is missing |
| Open polygon | You didn’t repeat the first vertex |
| “Indefinite” when it should be semidefinite | An eigenvalue of compared without a tolerance |
Before handing it in, ask yourself:
- Have I checked the matrix with
A*vandf(v)for some vector? - Have I checked the diagonalisation with
norm(A*P - P*D)? - If Sylvester doesn’t decide, have I looked at the eigenvalues with a tolerance?
- Are the eigenvectors in the same order as their eigenvalues?
Did this article help you? Here is how you can support SergioLearns →
Block theory: Matrices by columns, eig, Sylvester and plotsTransformations and forms in MATLABCheat sheet: the block on one page, to reviewCheat sheetLab assignments: the block's functions and a model scriptFor your lab assignments


