Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am trying to find a formal for calculating the internal volume of a cube.

for instance:

[][][][][]
[]{}{}{}[]
[]{}{}{}[]
[]{}{}{}[]
[][][][][]

with a height of $5m$, while each [] and {} represents $1m^3$ block.

with this example the internal cube ({}) is $27m^3$ (3*3*3).

I'm sure that's not a very good explanation, let me try another way. Imagine a cube at 5*5*5. Each block is $1m^3$. There must be a floor, ceiling, and walls. Given this requirement, this leaves the 3*3*3 inner cube.

Another example is a 3*3*3 leaving an interior of 1*1*1.

The question then is what's a formula that could calculate the inner volume given A by B by C?

This may not be a cube either could be a rectangle.

share|improve this question
    
What about (a-2)(b-2)(c-2)? –  rbm Apr 24 '13 at 13:21
    
A block $A \times B \times C$ is a parallelepiped or brick, but not a cube unless $A=B=C$ –  Ross Millikan Apr 24 '13 at 13:25
    
@RossMillikan of course, I had given a cube as two examples and had realized the possibility of other shapes. –  Eonasdan Apr 24 '13 at 13:29
    
I appreciate the amount of effort you put into explaining your problem clearly. Not everyone does this. Thanks! –  MJD Apr 24 '13 at 14:09
    
@MJD You're welcome. I spend a lot of time on SO so I try my best to write my own questions the way I expect others to write theirs. –  Eonasdan Apr 24 '13 at 14:41

2 Answers 2

up vote 3 down vote accepted

In each dimension, the walls will subtract 1 from each side (top-bottom, left-right, etc) so the inner volume of $A\times B\times C$ is $(A-2) \times (B-2) \times (C-2)$

share|improve this answer
    
I thought of that but it seemed to simple. Given 6*7*4 the inner dimensions should be $40m^3$? Right? Guess this question was more of a sanity check :) –  Eonasdan Apr 24 '13 at 13:23
    
@Eonasdan: That is correct. –  Ross Millikan Apr 24 '13 at 13:24
    
well I feel dumb now. Will accept in 5 minutes –  Eonasdan Apr 24 '13 at 13:26

This is the volume of a cube with a height of initial height-2.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.