1
$\begingroup$

I have entered a matrix by Insert->Table/Matrix->New.

After adding it to code, Mathematica wrote a remark: "Assuming a matrix | Use a list of lists instead".

Value is already looks as list of lists. Clicking "list of lists" does not change anything visible.

enter image description here

$\endgroup$
  • 4
    $\begingroup$ In Mathematica, a matrix is just a list of lists, so don't worry. This just means that the suggestions bar offers suggestions for matrices. If you clicked on "list of lists", you'd see different suggestions. $\endgroup$ – Niki Estner Nov 18 '14 at 11:53
  • 2
    $\begingroup$ strictly, a matrix must be 2d with equal length sub lists. functions such as linearsolve will only take proper matrices. $\endgroup$ – george2079 Nov 18 '14 at 12:33
4
$\begingroup$

The suggestions bar tries to offer a useful set of follow-up operations based upon the type of a result. In the case at hand, the result is a list of lists. But it so happens that all of the sublists are the same length, which happens to be the representation of a matrix in Mathematica. So the suggestions bar has guessed that the user has a matrix in mind and has offered follow-up operations that make sense for matrices.

However, it also realizes that it may have guessed in error. The user might be thinking about a simple list that, by sheer coincidence, has sublists of equal length. Hence the offer to treat the result as a list of lists instead. If we accept that offer, we are shown operations that make sense for nested lists:

suggestions bar screenshot

... along with the option to switch back to the matrix operations we were shown in the first place.

The suggestions bar does quite a bit of this inferencing. The goal is to read the user's mind -- but to give back-up options in case the mind-reading facility picks up the wrong signals ;)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.