I used to post my slides before a class. But I noticed that many students simply read it while in class instead of listening . So I am thinking not doing it in the future. But they can still get it from students who have taken the class before.
Then, what is it that I can add in a class? That is what confuses me.
That is the exciting part about teaching mathematics. No matter how clear the slides (or book or ...) and no matter how complete the proofs, there is a big role for helping students understand. I'll answer your comment rather than the question, as it seems that you would really like to upload slides ahead of time.
Here are some examples of things you can do instead of read slides in class, in rough order of increasing distance from "reading the slides". This is by no means comprehensive.
- Do an example similar to one you've prepared, but with some different twist (not necessarily just different numbers). For instance, if a slide shows a simple matrix multiplication, have one where the multiplication is commutative. Or where the multiplication doesn't even exist in the other direction!
- Better: have the students do an example that is similar, but different! For instance, perhaps your slide has a row reduction to a degenerate matrix, but the students are given one (or several split up among groups!) that might or might not be nonsingular. See what they get.
- Have a quiz based on a few of the slides at the beginning. Then you aren't just posting the slides ahead of time, you're expecting they will look at them. (I don't really recommend this with slides, but with a video this could work, and a lot of classroom management software now supports embedding basic types of quiz questions inside of narrated slideshows ...)
- Help your students discover your theorems in class using inquiry-based (or one of the many other names for this) learning. You can still do this with a "slides" as your main source, though in this case posting slides afterward might be a better bet ... and as you can tell, this is now pretty far from a slides-based lecture pedagogy.
I'm not sure what level (nor in what cultural milieu) you are teaching, but these can be translated to many different environs. You may have to "sell" new pedagogies to students unfamiliar with them, but, in my view, this is worth the effort. That, of course, is a big enough discussion for several other questions.