Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .is_singular method to matrices #10454

Closed
rbeezer mannequin opened this issue Dec 10, 2010 · 12 comments
Closed

Add .is_singular method to matrices #10454

rbeezer mannequin opened this issue Dec 10, 2010 · 12 comments

Comments

@rbeezer
Copy link
Mannequin

rbeezer mannequin commented Dec 10, 2010

Some approaches to teaching linear algebra define nonsingular matrices before broaching matrix invertibility. This will just add is_singular, with some changes to the associated documentation. thus making it a bit easier for Sage usage to follow one possible development of the topic.

Component: linear algebra

Author: Rob Beezer

Reviewer: Robert Bradshaw

Merged: sage-4.6.2.alpha3

Issue created by migration from https://trac.sagemath.org/ticket/10454

@rbeezer rbeezer mannequin added this to the sage-4.6.2 milestone Dec 10, 2010
@rbeezer rbeezer mannequin assigned jasongrout and williamstein Dec 10, 2010
@jasongrout
Copy link
Member

comment:1

Do you think it might be better to add the positive phrasing, m.is_singular(), rather than the negative nonsingular version?

@rbeezer
Copy link
Mannequin Author

rbeezer mannequin commented Dec 10, 2010

comment:2

Replying to @jasongrout:

Do you think it might be better to add the positive phrasing, m.is_singular(), rather than the negative nonsingular version?

I had that thought. It would then no longer be an alias, which means (a) the documentation could be separate from invertibility, and (b) it would only need to be done once (is_invertible is defined twice). Does it work for users/students? I like to define nonsingular, but there is no real good reason for that, I guess. What's your preference?

@jasongrout
Copy link
Member

comment:3

My advisor (who was a very good writer) taught me that when you are talking about matrices with determinant zero, and that is the focus, you should use "singular", and when you are talking about matrices with nonzero determinant, and that is the focus, you should use "invertible". This was to avoid confusing the reader with too many negatives. So I think having m.is_singular() and m.is_invertible() is a nice combination. It's easy to say "to check if a matrix is nonsingular, see if m.is_singular() is false".

Personally, I use "invertible" when talking about invertible matrices, so I guess it isn't that huge of a deal. I just thought things could be clearer by not putting a negatively-phrased is_* method in there.

@rbeezer
Copy link
Mannequin Author

rbeezer mannequin commented Dec 10, 2010

comment:4

Replying to @jasongrout:

Sounds very good to me. I'll likely take this approach.

@jasongrout
Copy link
Member

comment:5

I guess the other philosophy at play here is that typically, is_* functions determine what an object is, not what it is not. There probably are exceptions, though...

@rbeezer
Copy link
Mannequin Author

rbeezer mannequin commented Dec 10, 2010

Attachment: trac_10454-matrix-is-singular.patch.gz

@rbeezer
Copy link
Mannequin Author

rbeezer mannequin commented Dec 10, 2010

comment:6

It is never what it seems. Over a commutative ring, the right thing to do is to define is_singular() to be the condition that the matrix has a zero determinant.

So this needs to be a new method, it is better stated as the positive version, and it is more than just a convenience.

@rbeezer rbeezer mannequin added the s: needs review label Dec 10, 2010
@jasongrout
Copy link
Member

Author: Rob Beezer

@jasongrout

This comment has been minimized.

@jasongrout jasongrout changed the title Add to matrices .is_nonsingular() as an alias for .is_invertible() Add .is_singular method to matrices Dec 10, 2010
@robertwb
Copy link
Contributor

comment:8

Looks good to me.

@rbeezer
Copy link
Mannequin Author

rbeezer mannequin commented Dec 20, 2010

Reviewer: Robert Bradshaw

@jdemeyer
Copy link

Merged: sage-4.6.2.alpha3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants