Commodore Matthew Decker was a supporting character in Season 2 of Star Trek. Appearing in the episode "The Doomsday Machine", he was the commanding officer of the Federation starship Constellation. He was portrayed by William Windom.
In 2267, the USS Constellation was carrying out a routine survey of the L-374 star system when it was attacked by a gargantuan alien machine. This "planet killer" began carving up all planets in its path with a high-intensity antiproton beam and consumed the planetary debris to fuel itself. Commodore Decker ordered for his ship to attack the colossal robot, but the Constellation's weaponry had no effect on the planet killer's neutronium hull. When the machine returned fire, the Constellation was heavily damaged and left drifting. Decker decided to transport his crew down to the system's third planet for safety while he remained aboard to confront the machine. However, the planet killer redirected its attention to the planet and destroyed it, killing Decker's entire crew.
Later on, the Constellation would be discovered by the USS Enterprise. Captain James T. Kirk found Decker and asked him what happened, but the Commodore had been driven half-mad with grief over the loss of his crew. Decker was beamed over to the Enterprise while Kirk and Montgomery Scott remained aboard the Constellation in an effort to repair her, but the planet killer returned and attacked. Consumed with grief over his actions, and with an almost reckless desire for revenge, Decker seized command of the Enterprise after losing contact with the Constellation, leaving Captain Kirk stranded.
As the planet killer set on a course for the most densely populated system in range, Decker ordered the Enterprise to open fire on the machine. The planet killer's neutronium skin was completely impervious to attack and the Enterprise suffered heavy damage when the robot returned fire. Realising that Decker was not mentally fit for command, Spock and Dr. McCoy relieved the Commodore and had him escorted off the bridge. However, the Commodore overpowered his security escort and took a detour to the shuttlebay, commandeering a shuttle and piloting it towards the planet killer.
Spock hailed Decker and demanded he return to the Enterprise. The Commodore argued that he had realised too late that the planet killer had no external weaknesses, but theorized that it could be destroyed from within. He flew the shuttle directly into the machine's gaping maw and set his engines to overload. The shuttle exploded inside the planet killer, vaporising Decker in the process. The detonation of the shuttle caused negligible damage to the robot, but Decker's sacrifice inspired Kirk to try the same tactic using the Constellation as its larger, more powerful engines would cause a greater explosion. Kirk succeeded where Decker had failed and disabled the planet killer after detonating the Constellation inside its maw, beaming back to the Enterprise just before detonation.