Show matrix is not invertible.
Show older comments

2 Comments
Dyuman Joshi
on 23 Oct 2023
How is your question related to MATLAB?
John D'Errico
on 23 Oct 2023
Edited: John D'Errico
on 23 Oct 2023
Geez. Was there a reason for everybody to jump in and do this homework assignment? You teach the student nothing more than that there are too many people willing to do their work for them. And that can never be a good thing.
Answers (5)
You can simply show that A is not full rank
syms a b c d e f g h
A = [a 0 0 b 0; 0 c 0 0 d; 0 0 e f 0; 0 0 0 0 g; 0 h 0 0 0]
rank(A)
5 Comments
Matt J
on 23 Oct 2023
Curious. Obviously when a=b=c=d=e=f=g=h=0, the rank will be zero. I wonder what assumptions it is making to reach rank=4.
Fabio Freschi
on 23 Oct 2023
Interesting comment. Curiously also the rank calculated by WolframAlpha is 4. Eager to read a good explanation of this behavior

The doc page for rank doesn't decribe what algorithm it uses to determine the rank. However, it does point out potential problems with the function. For example
syms A x
A = [1-sin(x)^2 cos(x)^2; 1 1];
rank(A) % wrong?
rank(simplify(A,10)) % different
Torsten
on 23 Oct 2023
In Mathematica, it is assumed that all symbols used in the matrix representation are independent. In the present case, this means 0 ~= a ~= b ~= c ~=d ~=e ~= f ~=g ~= h.
Fabio Freschi
on 23 Oct 2023
@Torsten: thank you! good to know
b/a*[a 0 0 0 0] + f/e*[0 0 e 0 0] = [b 0 f 0 0]
syms a b c d e f g h
A = [a 0 0 b 0; 0 c 0 0 d; 0 0 e f 0; 0 0 0 0 g; 0 h 0 0 0];
det(A)
1 Comment
Or, analytically,
syms a b c d e f g h
A = [a 0 0 b 0; 0 c 0 0 d; 0 0 e f 0; 0 0 0 0 g; 0 h 0 0 0]
B=A(2:4,3:5)
By co-factor expansion, clearly,
det(A) = -a*h*det(B)
and clearly det(B)=0.
When you calculate the terms of the determinant, every component is 0.
syms a b c d e f g h
A = [a 0 0 b 0; 0 c 0 0 d; 0 0 e f 0; 0 0 0 0 g; 0 h 0 0 0];
syms M [5 5]
D = det(M);
DC = children(D)
det_components = cellfun(@(c) subs(c, M, A), DC, 'uniform', 0)
temp = [det_components{:}];
sum(temp)
4 Comments
Matt J
on 23 Oct 2023
That is interesting, but it seems like an unnecessarily strong condition.
Walter Roberson
on 23 Oct 2023
The statement is descriptive. A determinant can come out zero because the sum of the terms happen to be zero, or because each individual term is zero (in which case the sum would be zero too). For this particular matrix, it does not just happen that some of the terms cancel out the others: each individual term was zero too.
Matt J
on 23 Oct 2023
Yes, you've shown a stronger condition than det(A)=0, but why did you need to?
Walter Roberson
on 23 Oct 2023
What was needed was to show that the sum of the components was 0. Along the way it turned out that for this particular matrix, that every component was 0 . (Which saved having to do any kind of proof that the sum of the non-zero components would definitely be 0.)
Hi @L
I believe this is an exercise in the Linear Algebra course. You have likely learned how to find the determinant of a matrix and calculate the inverse of a matrix using formulas. Additionally, you may know that if the determinant of a matrix is zero, the matrix is considered singular and not invertible.
However, I doubt your professor expects you to manually calculate the symbolic determinant of a 5x5 matrix using pen and paper. There are likely properties of matrix A that allow you to demonstrate that its determinant is zero with pen and paper, similar to the approach shown by @Matt J, but perhaps not as theoretically detailed as in @Walter Roberson's proof.
One of these properties is the fact that "if matrix A is invertible, then its reduced row-echelon form is an identity matrix". You can perform Gaussian elimination by hand to obtain the reduced row-echelon form. In MATLAB, you can achieve this using the "rref(A)" command. By inspecting the reduced row-echelon form, you can determine whether it resembles an identity matrix or not.
syms a b c d e f g h
% Original matrix
A = [a 0 0 b 0; 0 c 0 0 d; 0 0 e f 0; 0 0 0 0 g; 0 h 0 0 0]
% Perform Gaussian elimination to obtain the reduced row echelon form
R = rref(A)
Essentially, this result also implies that a row or column of matrix A is a linear combination of two or more rows or columns, respectively; thus,
. This is why you can't achieve full rank, as demonstrated by @Fabio Freschi.
rank(R)
Categories
Find more on Number Theory in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



