Manual or automatic transmission?

No the manual transmission likely failed as its made by Toyota.

There is a higher than normal failure rate on Toyota Matrix/Pontiac Vibe(same car essentially underneath) on manual transmissions. Toyota despite its golden reputation flubbed up this design.

Manuals are far less prone to failure generally.