how to save material library
The Blender default start-up file is named "startup.blend". On the version of Windows that I use for Blender, the file is located in a sub-folder of the users folder on the drive upon which Windows is attached named AppData\Roaming\Blender Foundation\Blender\VER\config, where VER is the Blender version number. I don't know enough about Blender on other platforms (MAC, Linux) to know exactly where the startup file is located there. 

One way to do what you want is to start a clean instance of Blender, create your desired materials as data blocks assigned to the default cube, and then overwrite the default startup.blend file with the version you altered. Doing this will make the material library permanently available as part of the start up default. Note, though, that if there is a chance that you might want to use the original default file at some point, you may want to create the desired materials as a data block or data blocks of the default cube, and use the "Save startup file" option of the file menu (keyboard shortcut CTRL-U) to save a copy of the start-up file which would load instead. Doing this, will allow restoration of the default start-up file, by choosing "Load factory settings" on the file menu more easily than if you overwrite the startup file.

Instead of assigning the materials to the default cube, you can create your two materials ans click the F button next to the material's name (Save datablock even if it has no users) 
that will allow you to save your startup and keep your materials always available without assigning them to your cube.