I am not formally trained in music but was wondering if it is better to try and learn intervals without looking at an instrument or if it doesn't matter really? I suppose on written tests you wouldn't have an instrument present, so is it better to practice with or without an instrument?
The problem with intervals is they're essentially academic. As in each interval with a specific sound will have at least two names. Example - C>F♯ is an augmented 4th, and C>G♭ is a diminished 5th. Both sounding, on an 12tet tuned instrument, exactly the same. If someone played that interval to you, there's no way of telling which label to use without reference to something written down.
Once the lower note is established in name, and/or on the stave, then the 'correct' other note can be written, making it more simple in a theory exam, for instance, to get it right.
Purely playing two notes will, of course, narrow the choice of name down, often to two of the most used interval names, and you will familiarise yourself with that sound. But playing a m3 on an instrument doesn't mean it is m3 - it may have been written, to be technically correct, as augmented 2nd.
TL;DR: You need to find a way that works for you. If it works for you to practice them on an instrument and then create a mental image of that while taking a test, it's correct, that's what I do.
Longer answer: I suggest you practice them with an instrument when you can! That's what I did, that's how i learnt how to identify them (both by ear and on paper).
Basically, what I did was to take my knowledge of the notes on the guitar and apply them to the interval tests. So let's say I had to identify an interval like
C - Eb. I had no clue how to do that on the paper, but I knew where the notes where on the guitar and I knew the sound of this interval -- it's a minor third. That was the way I thought about interval identifying on tests.
This is something you cannot do on a test (because my guess is that you won't be able to have an instrument with you), but it's something you can practice at home and prepare yourself for the test, on which you can easily create a mental image of your guitar fret and do this.
Usually, people that mark tests won't ask you how you identified any interval. They just need to see if you know how to do it. So, find any way that works for you and use that! It's good to point out though, that they might ask you to show how you worked to identify the intervals. I'm not sure if this way will be acceptable, but when I was learning my intervals, they were "making" us count semitones; so, a minor third would be 3 semitones, a perfect fifth would be 7 semitones etc.
...on written tests you wouldn't have an instrument present...
I assume the context is identifying intervals written in staff notation.
There is a sort of 'gotcha' that can come up if you identify intervals on an instrument versus staff notation.
The issue involves enharmonic equivalent intervals. Enharmonic equivalent means the number of semitones in two compared intervals are the same, but they are spelled differently in staff notation. I disagree with @Tim's answer that this matter is purely academic. Enharmonic spellings indicate what is happening within the tonal system and the understanding/function of the interval will change based on those details.
The most emphatic example I can think of is the minor seventh (10 semitones, ex.
F5) and it's enharmonic equivalent the augmented sixth (also 10 semitones, ex.
In common practice harmony a typical occurrence of a minor seventh is in the dominant seventh chord. In
C major the interval
F5 or in solfege the scale degrees
FA. That dissonant interval will normally resolve by
FA moving down to
MI. Again, this minor seventh is 10 semitones in size.
Compare this to the augemented sixth, again in
C (minor, but that doesn't really matter for this example.)
F#5 of in solfege
FI is 10 semitones and so the same size as a minor seventh. The the resolution of this dissonance is totally different than the minor seventh, because of the placement of the tones in the tonal system. Instead of the bottom note remaining unmoved and the upper tone resolving with a downward step, the augmented sixth resolves by
LE moving down a semitone to
FI moves up a semitone to the
SOL above -
Ab4 goes to
F#5 goes to
...is it better to practice with or without an instrument?
From the above example you should see it makes all the difference to see the notated interval.
With only an instrument, if you simply play two tones 10 semitones apart on guitar/piano, you simply don't know what to call it! Most people will probably call it a minor seventh, but it isn't necessarily.
Without an instrument - understood to mean staff notation - we not only can see the interval size of 10 semitones, but by the specific spelling we can see the harmonic meaning of the interval.
On one hand the issue is academic in that you will get tricky enharmonic spelling questions like this on an exam.
On the other hand it isn't purely academic, because in a real musical context enharmonically equivalent intervals can behave differently.
Perhaps the best way to think about it - and avoid the either/or question - is to practice intervals in harmonic context whether on paper or on an instrument.