>> det ([sym('a'), sym('b')])
ans =
a
How do you define "determinant of a non-square matrix" ?
As far as I know and after asking wikipedia I have the impression, that "determinant" are defined for square matrices only.
Jan
No. Determinant has no mathematical definition for a
non-square matrix, at least not traditionally so.
There is one attempt to make such a definition, already
found on the file exchange. I recall that I strongly
disagreed with dett when the file was submitted, but
it does still exist on the FEX.
Why do you wish to use such a tool? If your goal is
simply to identify if the matrix is singular, then a
determinant is ALWAYS the WRONG thing to use!!!!
Any such determinant here will have numerical
problems, and will not reliably predict the singularity
status of your matrix in floating point arithmetic.
Instead use rank, a far more reliable tool, that already
is found in every matlab installation. If rank returns
a number that is less than min(size(A)) for a given
matrix A, then A is numerically singular, and this is a
reliable test.
John
Dears,
If you have a 2xn Rectangular matrix then you can find its determinant for sure.
I dont know if MATLAB can do this for you or not. But there is no problem them algorithm is simple enough to write in MATLAB .. For reference look through this paper appeared in EMIS (The European Mathematical Information Service) Journal.
Beiträge zur Algebra und Geometrie
Contributions to Algebra and Geometry
Volume 46 (2005), No. 1, 321-349.
May be you have a matrix in 2xn form then you have your problem solved.
Let me know if it helped.
Regards,
Muhammad Faraz
> If you have a 2xn Rectangular matrix then you can find its determinant for sure.
How?
> I dont know if MATLAB can do this for you or not. But there is no problem them algorithm is simple enough to write in MATLAB .. For reference look through this paper appeared in EMIS (The European Mathematical Information Service) Journal.
> Beiträge zur Algebra und Geometrie
> Contributions to Algebra and Geometry
> Volume 46 (2005), No. 1, 321-349.
Could you post the name of the article, please? Looking in the online service, I cannot find anything after the page 300:
http://www.emis.de/journals/BAG/vol.46/no.1/17.html
Jan
John,
I second every word you say! But - Matlab computes the determinant of a symbolic non-square matrix without the slightest warning (see my example). I just wanted to make sure that there is not a mathematically agreed definition of a non-square determinant before I file a bug report.
Joerg
Hey Jan ..
I m sending you email but it is popping back. DNS requested is not being recognized..
I already attached the paper and sent it to Joerg.
If you have a direct access try this
www.emis.de/journals/BAG/vol.46/no.2/b46h2rad.pdf
Regards,
Muhammad Faraz
> I m sending you email but it is popping back. DNS requested is not being recognized..
There are some obviously more or less obvious changes in my email address.
> www.emis.de/journals/BAG/vol.46/no.2/b46h2rad.pdf
Thanks! And the name of the article is "About a determinant of rectangular $2\times n$ matrix and its geometric interpretation", Mirko Radi'c
Jan
http://www.zentralblatt-math.org/zmath/scans.html?volume_=168&count_=027
Nevertheless, Matlab does not use Mirko's definition to compute symbolic rectangular matrices. Matlab seems to returns the determinant of the left mxm submatrix of an mxn matrix if m<n:
>> a = [a11 a12 a13; a21 a22 a23]
a =
[ a11, a12, a13]
[ a21, a22, a23]
>> det (a)
ans =
a11*a22 - a12*a21
If m>n, Matlab throws an error:
>> a = [a11 a12; a21 a22; a31 a32]
a =
[ a11, a12]
[ a21, a22]
[ a31, a32]
>> det (a)
??? Error using ==> mupadmex
Error in MuPAD command: second index out of range [(Dom::Matrix(Dom::ExpressionField()))::_index]
Error in ==> sym.sym>sym.det at 1437
d = mupadmex('mllib::det',A.s);
Thats true.. All the information is true.
But what my concern is if the information i have given helped u solving ur problem..
Let Matlab do tehre own procedures but as long as ur problem is concerned if u got 2xn matrix that page would be enough to solve ur problem..
Let me know if i helped you in any ways..
Regards,
Muhammad Faraz
Muhammad,
Thank you very much for your help!
I teach mathematics with Matlab's symbolic toolbox since a decade and want my students to trust the tool they are working with. Therefore, I filed some 20 or 30 bug reports since MuPAD became the "new" symbolic engine a few years ago, most of which have been taken care of (Thanks alot Mathworks!). In this case, I just wanted to know if anybody could explain Matlab's unexpected computation of determinants of rectangular matrices to me before I called it a bug.
Joerg