If the word "hang" seems odd here, it is because it was chosen to be surprising. In English translation, Jesus seemingly makes the point that from these two commandments, we get all of the rest of the law, but that is not what he says. Jesus only uses this verb twice. It means to "hang up," "hang," and "crucify.” The form is either the passive voice, “is hung” or the middle voice, “hangs itself.” The only other time Jesus uses this verb is to talk about a millstone hung around someone neck when they are tossed into the sea for corrupting children. It is singular, so it applies to only the "law" part directly, The "prophets" is an afterthought.
This word is the key to this verse as the punchline of the four verses. I applaud the translators for accurately representing it. The word has two implications. These two commands are higher than the law because they hold everything else up. These two commands are the judge and jury which can execute all other lesser laws. Notice how “and those prophets” is added at the end, creating an image of the prophets being hung.