# Is there a way to change the behavior of matrices globally?

For instance, I want that Dot would be used as default multiplication of matrices instead of element-by-element multiplication. Similarly, I want any function (such as Sin [M]) when acting on a matrix, would return the same as MatrixFunction [Sin,M] instead of acting on the elements separately. Is it possible?

Maybe there is such global option?

• Independent of whether this is possible, it would be a very bad idea to enforce that. Better not waste your time for trying to beat the system. Mar 11 at 14:32
• I think it might be useful (for yourself, and for others coming to this QA) if you can identify exactly why it is that you would want to do something of this nature. If it is to save a number of keystrokes, this is one thing and may not make it worth your efforts, but if it is for another reason that seemingly carries enough worth, that is another story entirely. Mar 11 at 17:01

In some cases, you can do the kind of thing you want with UpValues, essentially defining your own matrix type. But not exactly what you want, since Times is Orderless, and matrix multiplication doesn't commute. This is an example of the rigor that a mindless CAS needs. Humans can use ambiguous notation, but computer notation must clearly distinguish between commutative and non-commutative multiplication.
• Also, functions such as Sin are Listable. Messing with this would do massive damage. Mar 11 at 14:54
• @BobHanlon You wouldn't have to mess with the Listable attribute, as you would be making your matrices something that doesn't have List as its head. The Orderless attribute of Times is much more problematic. Mar 11 at 14:59
• @BobHanlon You could defeat Listable by wrapping your matrix. Not Orderless, though. Mar 11 at 15:25