i want to learn the grammar of the quran from some books I found. They are available for free on the Internet Archive. I think almost all books have on their first pages the quote "All rights reserved" or there is a clear sign that it has copyright. Only on the second volume of a book I want to read, the copyright isn't clear but the first volume of this book has the copyright so you can say that the second volume also has copyright. Also some books are I think public domain because the "first" time these books were published, it was before 1923. Can someone help regarding these topic: Islamic ruling of reading books online for free, Public domain (halal or haram) and also books on the internet archive that have this text:
"May be used for non-commercial, personal, research, or educational purposes, or any fair use".
You said you used it for educational purposes, so it is legally and Islamically allowed.
Aslong as the book is free for non-commercial, personal, research, or educational purposes, it is perfectly halal (if the contents aren't haram) to read them.
Haram starts when the book is not free for non-commercial, personal, research, or educational purposes, and you read it for free (without permission of course).