If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Perimeter of a rectangle using variables

Let's learn how to write the perimeter for any rectangle in the language of mathematics using variables. Created by Aanand Srinivas.

Want to join the conversation?

Video transcript

let's talk about the perimeter of a rectangle that's something you've already done before but this time we're going to talk about it in variables so can you write the perimeter of a rectangle in variables now what does it mean to write something in variables if you write it for only one rectangle so that it works for this number and this number so if you want only it to work only for one number then you write it in numbers but if you wanted to work for any number any length and breadth of a rectangle whatever rectangle you give me this will be the perimeter if you want to write it that way then you use what's called variables or which is just variables or just another way to write for any number so you know enough now to try this on your own so take a shot at it and then let's see if both of us did it the same way the way I would do it is look at this and go okay that's four here that's the length so it must be four over here three over here so the breadth will be three over here now I'm going okay I just have to find the perimeter which is the sum of all the lengths let me add the force first so I have four plus for the two lengths and then I have the two breaths plus 3 plus 3 plus 3 plus 3 now I can see that I have 2 times 4 plus 2 times 3 2 times my length 4 plus 2 times my breath 3 plus 2 times my breath 3 now I look at this and I can calculate the answer to this this will be 2 into 4 which is 8 plus 2 into 3 which is 6 the total equals 14 so 14 is a perimeter of this rectangle I'll maybe look at one more example to see what I'm doing here because when I see this I can see that I'm adding 2 times the length plus 2 times the breadth so let me take one more triangle one more rectangle I'm sorry and now do it for this so what I'll do here I'm noticing I'm doing the same thing I'm going to take 7 plus 7 this time because it's 7 over here and 5 plus 5 Plus 5 plus 5 so 2 times the length plus 2 times the breadth that's what I'm doing in all these case so here this will be two times seven plus two times five two times seven plus two times five now you can find the answer to this one as well two times seven is 14 plus 2 times 5 is 10 and this is 24 so that's the perimeter of this rectangle now what I notice when I do this is that my brain is shouting hey you know what you don't have to tell me what this length is whatever length you give me so any length you give me if I take another rectangle here any length you give me any length it doesn't matter I just have to add this length twice because this length is there and this length is there and then I have to add the breadth twice so it can be any breadth over here any bread over here and I just have to add that also twice two times length plus 2 times breadth so I'm just gonna write that over here so I know that my perimeter is going to be equal to two times the length whatever length this is plus two times the breadth plus two times the breadth now I look at this what is this equal to this is equal to my parameter so I'm gonna write parameter as parameter PR IM e ter now what I've done here is enough for this question I have written parameter as something in variables length is a variable breadth is a variable but there is long variables so what does this length stand for any length somebody tells you my rectangle has some length in some red you'll just put the length here in breadth here and you'll get the answer to the perimeter but because these are long and we like to write things short so I can write P for perimeter equals 2 times length so 2 into length and I can just write L for length because it's much smaller than writing the entire thing plus 2 times B plus 2 times B for breath now notice that I can leave it right here if I want to length there's also a variable you can use a big word also the variable variable doesn't have to be just an alphabet can be anything as long as you know what you're writing so I look at this and I do one last step see math we want to make it as small as we can so what's one thing that's that I'm not staring at me this too is telling you know what I'm here and I'm here take me out take me out so I say okay I'll do that so I write P over P equals two times length plus breath within brackets length plus breath length plus breath over here so there you have it this is the shortest way in which you can write the perimeter of a rectangle just gonna draw a box around this so if you are asked to write the perimeter of a rectangle in variables this is what we write it's 2 times the sum of the length and breadth so add the length and width and multiply it by 2