Someone from upper management that I don't work with emailed me to schedule meeting. Is it rude to ask if the meeting is mandatory or should I just go ahead and give my available time. I'm not busy or anything I just don't like to sit in meeting.
If someone specifically emails you to arrange a meeting it is definitely mandatory.
Since people don't read, let me repeat that. If someone emails you to ask when you are free, the meeting is mandatory. That's not the same as just getting an invitation, which may or may not be mandatory.
Optional meetings are done by just setting up a time and sending you an invitation. Also any meeting with only a few people, or individually selected people (as opposed to all people on some list) are almost always mandatory.
By "mandatory" I mean you are expected to show up unless you negotiate your absence. That's not to say you can't get out of it. It's entirely reasonable to ask what the meeting is about, and if you really have nothing to contribute say so. Remember that "this meeting is not interesting to me" or even "this meeting doesn't help me with my work" is not necessarily a reason not to attend. You may be required to give input that helps someone else with their work.
In general asking a senior manager directly if a meeting is mandatory can be rude, or at least potentially career limiting. It implies that the manager creates meetings for no reason, or that their meetings don't help the goal of the company.
Instead ask what the purpose of the meeting is, and what your contribution is expected to be - implying that you need to prepare in order to make the meeting most effective. If the meeting is truly optional you will usually be told at this stage. Or, if they don't give you a clear role in the meeting, you may be able to reply by saying that you don't think you have much to contribute, and ask whether your presence is really necessary. Note that sometimes attending a meeting is good for your career, even if you don't contribute all that much. And that sometimes simply knowing what senior management is thinking is good for your career, and for the effectiveness of your work.
In any company which is not a joke upper management is always so busy that to get a meeting with them there must be something serious going on.
Someone from upper management that I don't work with emailed me to schedule meeting.
In this case it's not even you to ask them a meeting, it's them asking to you. You can be assured they don't want to waste an hour of their time. They want to discuss something worth one hour of their time.
If that doesn't fit in the definition of mandatory meeting, I don't know what can.
Asking if it's mandatory is about the worst possible action.
It's basically saying, "Hey, I don't think your meeting is worthwhile, and am only going to attend if it's a required action." Which, yeah, is rude.
Instead, I'd suggest one of the following:
A) Simply don't go.
B) Simply go.
C) Ask, "Will I need to prepare anything for it? And what's the meeting agenda?" ... and then from there decide whether to go or not.
If you think it might not be intended for you, you better check. I used to get meeting invites for the guy who was just in front of me in alphabetic order in the huge company address book. By checking I avoided my time being wasted, and the poor guy being blamed for missing a meeting when his invitation was sent to me by mistake.
And there's the question what you will be missing elsewhere if you attend the meeting, which the inviter cannot know. If you tell the inviter "I can come to the meeting, but we'll likely lose a big deal if I don't visit customer X at exactly that time.", that's perfectly fine. Your decision who you ask. For example, it might be wiser to call your manager "Sorry, but I got a meeting invite just at the time when we were supposed to meet about X. Can we move our meeting, can you do that meeting without me, or should I try to get out of the other meeting".
It's mostly just common sense.
What kind of meeting is this?
Is it a 1:1 meeting from a higher level manager? Mandatory.
Is it related to a project you work on, or that may be related to one you work on? Mandatory for at least the first, if its a repeating meeting you may find it doesn't provide value to anyone for you to be there.
Is it a town hall or other informational meeting? Optional.
Is it a giant meeting with dozens of people? Optional, they were just spreading a wide net.
Is it a rah rah meeting for morale purposes? Optional, and in fact better for you to just work if that type of meeting is demotivating to you.
In any case I wouldn't ask if it was mandatory. If you really feel its useless to you AND to them for you to be there (or minimal value, like the informational or rah rah meetings) then just don't show up unless pinged and apologize if that happens. Or reject the meeting invite.