Thanks for the answer. I was not specific enough. So the issue was I couldnt assign variables (assigned by 'syms') to the "excel sheet" where I was assigning elements to it.
I would disagree with that statement. You can divide anything INTO any of the variables a,b, or c, regardless of whether they might be zero or not. I'll do the RREF ops by hand to show what happens. I'll use a sequence of pre-multiplies by transformation matrices to do the ops in a simple fashion.
syms a b c
A = [1, 2, 3;
4, 5, 6;
7, 8, 9];
A0 = [A,[a;b;c]]
A0 =
1 - Reduce column 1, pivoting around element (1,1). You now have:
A1 = [1 0 0;-4 1 0;-7 0 1]*A0
A1 =
2 - Next, work on column 2, pivoting around element (2,2).
A2 = [1 2/sym(3) 0;0 -1/sym(3) 0;0 2 -1]*A1
A2 =
That a, b, or c could be zero is not yet an issue. In fact, any or all of them could take on any value, and we never divided by any of a,b, or c. However, we might decide to stop at this point, since the (3,3) pivot is zero, and the non-zero status of the (3,4) element is uncertain. This tells us that A had rank 2. I'd not have an issue had rref stopped at that point, OR if you claimed it should have done so, but performing the last step does not disconcert me at all.
It clearly tells us that the general vector [a;b;c] does not live in the column space of A, UNLESS of course, the variables {a,b,c} are related in this way:
-a + 2*b - c == 0
(The one thing rref does not tell us. Sigh.) So any one of those variables COULD be zero. Only in the circumstance that [a;b;c] is a multiple of the vector [-1 2 -1] is there any issue. That vector happens to define the null space of A.
null(sym(A))
ans =
Anyway, HAD you claimed that the RREF should have stopped at this point, due to the potential for a divide by zero, in the event that -a+2*b-c==0 and we could not then reduce column 4, I might be willing to agree. Solve would also effectively tell us that, for example, if I did this:
a: z
b: -2*z
c: z
parameters: z
conditions: symtrue
And there, we see a solution exists when the vector [a;b;c] is a multiple of [1;-2;1], and thus falls in the nullspace of A.
In the end, rref told you all of this, if you chose to think about what it said. That requires understanding the linear algebra, and WHAT it was telling you.
Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.
Translated by
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.