Not really, there is a slight difference between the two. But they are very close.
The sentence 'le' is the masculine form of 'the', and 'un' is the masculine form of 'a'. It wants it to be translated to "It is a book", therefore it uses 'un' not 'le'. In the examples for 'livre' the 'le' is just there to drill in that it is masculine. At least as far as I know.
Are you asking whether livre is masculine or femenine? If so. I'm fairly certain it is masculine considering every example for it has 'le livre' and not 'la livre'. Also, 'un' is the masculine form of 'a' and 'une' is the feminine form of 'a'.