I found this online to help with infinitives but what I don't understand is in the second example "el saber" is acting as a verb isn't it? because the translation is "knowing" so why did the writer say putting "el" in front of the infinitive makes it clear the word is acting as a noun but in that phrase it's acting as a verb?

Tengo miedo de estar sola en la casa.
I'm afraid of being alone in the house.

A veces, el saber es peor que el no saber.
Sometimes, knowing is worse than not knowing.
(Putting "el" in front of the infinitive verb is optional, and it makes it clear that the word is acting as a noun and not a verb in that sentence).

I'll send this to our Spanish expert, SraJMcGin.

Yes, the "el" in front of the infinitive, makes it a noun!

SraJMcGin

In the example "el saber es peor que el no saber," the phrase "el saber" is indeed functioning as a noun phrase, even though it translates to "knowing" in English. Let's break it down to understand why.

In Spanish, infinitive verbs can sometimes behave like nouns. They can be the subject or object of a sentence, just like a noun would be. In this case, "el saber" is being used as the subject of the sentence, meaning it is being treated as a noun.

To clarify that the infinitive is functioning as a noun in this particular sentence, the writer suggests using "el" in front of the infinitive verb. However, it's important to note that using "el" is optional, and the sentence is grammatically correct without it.

So, in summary, even though "el saber" translates to "knowing" in English, it is acting as a noun in the given sentence. Using "el" in front of the infinitive verb is simply a way to emphasize and clarify its role as a noun, but it is not necessary for the sentence to be grammatically correct.