Why does LTSpice say that my "Matrix is singular" for this ideal-transformer circuit?

You need a DC path between the two circuits. Put a high value resistor between them, say 10M.

I checked that it worked using Pulsonix (actually SIMetrix) SPICE. I got a singular matrix error without the resistor.


There is a SPICE parameter called RSHUNT which adds shunt resistors to GND on every node. By default it is usually set to ZERO (that meaning no shunt resistors). If you make this a very high value (1e12) then it won't affect the simulation, but it will provide a finite resistance between all nodes, avoiding the singular matrix error.